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
When using the Slot component from @radix-ui/react-slot in a Next.js 15 project (potentially related to React 19 compatibility), TypeScript throws type errors indicating that the Slot component cannot be used as a JSX element. This affects form components and other UI elements that utilize the Slot primitive.
Expected behavior
The Slot component should work correctly as a JSX element without TypeScript errors, maintaining compatibility with Next.js 15 and React 19.
Reproducible example
Create a Next.js 15 project
Install @radix-ui/react-slot
Try to use the Slot component in a form component like so:
This issue specifically affects form components that use the Slot primitive for composition. The error suggests there might be an incompatibility between the ReactNode types being used by Radix UI and those provided by React 19.
Bug report
Current Behavior
When using the
Slot
component from@radix-ui/react-slot
in a Next.js 15 project (potentially related to React 19 compatibility), TypeScript throws type errors indicating that the Slot component cannot be used as a JSX element. This affects form components and other UI elements that utilize the Slot primitive.Expected behavior
The Slot component should work correctly as a JSX element without TypeScript errors, maintaining compatibility with Next.js 15 and React 19.
Reproducible example
Create a Next.js 15 project
Install @radix-ui/react-slot
Try to use the Slot component in a form component like so:
Suggested solution
Additional context
This issue specifically affects form components that use the Slot primitive for composition. The error suggests there might be an incompatibility between the ReactNode types being used by Radix UI and those provided by React 19.
Your environment
The text was updated successfully, but these errors were encountered: