Closed krystofrezac closed 7 months ago
@krystofrezac, you can add React.PropsWithChildren ThemeProvider: React.ComponentType<React.PropsWithChildren<{ theme?: Theme }>>;
. Both options are correct
@SergeyBakutov good point. I think that your suggestion is cleaner so I updated the code😃
👀
Any updates on this? I'm also having this type issue with React 18
So?
Fixed in #155 and released on version 3.0.9
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