Commit 4219a74
committed
Refactor Button component to use React 19 ref pattern
- Remove React.forwardRef wrapper as per React 19 guidelines
- Add optional ref prop to ButtonProps interface with type React.Ref<HTMLButtonElement>
- Convert Button to normal function component that extracts ref from props
- Pass ref directly to rendered component (Comp)
- Maintain all existing functionality while aligning with modern React patterns
This change follows React 19's simplified ref handling where refs are treated as regular props instead of requiring forwardRef.1 parent cd8e40c commit 4219a74
1 file changed
Lines changed: 12 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
| |||
0 commit comments