Skip to content

Conversation

@krystofrezac
Copy link

@krystofrezac krystofrezac commented Aug 21, 2022

I added children to the ThemeProvider props type. In React 18 implicit children type was removed and needs to be typed explicitly.
tweet with more info
issue

@SergeyBakutov
Copy link

SergeyBakutov commented Sep 8, 2022

@krystofrezac, you can add React.PropsWithChildren ThemeProvider: React.ComponentType<React.PropsWithChildren<{ theme?: Theme }>>; . Both options are correct

@krystofrezac
Copy link
Author

@SergeyBakutov good point. I think that your suggestion is cleaner so I updated the code😃

@sorenhoyer
Copy link

👀

@s1gr1d
Copy link

s1gr1d commented Feb 4, 2023

Any updates on this? I'm also having this type issue with React 18

@BohdanK-W32
Copy link

So?

@douglasjunior
Copy link

Fixed in #155 and released on version 3.0.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants