-
Notifications
You must be signed in to change notification settings - Fork 289
Open
Description
Please follow the general troubleshooting steps first:
- Is your app running over HTTPS? (please provide the URL if possible)
- Have you tried running the demo (https://codepen.io/mozmorris/pen/JLZdoP) on your device?
- Checked the latest "Can I use" compatbility table? (https://caniuse.com/stream)
Bug reports:
CodeSandbox: https://codesandbox.io/p/sandbox/v2gpf8
Type Error:
Type '() => JSX.Element' is not assignable to type '((string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | null) & ((childrenProps: ChildrenProps) => Element)) | undefined'.
Type '() => JSX.Element' is not assignable to type 'string & ((childrenProps: ChildrenProps) => Element)'.
Type '() => JSX.Element' is not assignable to type 'string'.
What can be the best way to remove this error?
Just passing the Element doesn't help. I am using React 18.3.1 and seems like the error is because in React 18, the children prop now needs to be listed explicitly when defining props; or something on those lines.
Please help!
Metadata
Metadata
Assignees
Labels
No labels