You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(react): normalize forwardRef props to ComponentPropsWithoutRef
The codebase mixed `ComponentProps` (with ref) and `ComponentPropsWithoutRef`
across prop interfaces, all consumed by `React.forwardRef`. Normalize to
`ComponentPropsWithoutRef` throughout — the idiomatic pattern React docs
recommend for forwardRef, since forwardRef re-adds ref via `RefAttributes<T>`
to the external component type.
Side benefit: for the handful of non-forwardRef components (Link, Form,
FormItem, Descriptions), this removes `ref` from the prop type so consumers
can no longer pass a non-functional `ref` prop.
Zero external API change for forwardRef components — `<Button ref={...}/>`
still type-checks via `RefAttributes<HTMLButtonElement>`.
0 commit comments