-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
@types/react@18
removed implicit children prop from type React.FC
, from now on children
should now be explicitly defined.
DefinitelyTyped/DefinitelyTyped#56210
From a quick exploration; extending BoxExtendedProps
instead of BoxProps
on affected components should resolve the issue :)
Expected behaviour
Allowed to pass children props when using React 18 and TypeScript.
Current behaviour
TypeScript complains that Property 'children' does not exist on type X
.
https://codesandbox.io/s/fragrant-waterfall-6921n6?file=/src/App.tsx
Steps to Reproduce
Create a new project with React 18, @types/react@18
and TypeScript.
Your Environment
- Grommet version: 2.22.0
- Browser Name and version:
- Operating System and version (desktop or mobile):
Metadata
Metadata
Assignees
Labels
No labels