-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[FEATURE] type support of react 19 ref as props #2925
Copy link
Copy link
Closed
Labels
featureNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
react 19 support ref as props, but motion.create only allow ForwardRefExoticComponent as input
Describe the solution you'd like
modify the type of motion.create accept normal function component
Describe alternatives you've considered
create a wrapper to cast type
Additional context
current workaround
function createMotion<T>(
render: FunctionComponent<T>
): ExoticComponent<MotionComponentProps<T>> {
return motion.create(render as any);
}I tested, it works in runtime
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew feature or requestNew feature or request