chrisdrackett / react-mapkit

React wrapper for Apple's mapkit.js.
https://chrisdrackett.github.io/react-mapkit/?selectedStory=all%20props&full=0&addons=1&stories=1&panelRight=1&addonPanel=storybooks%2Fstorybook-addon-knobs
MIT License
76 stars 26 forks source link

Change the Component FC types to wrap with PropsWithChildren #91

Closed MohaElder closed 2 years ago

MohaElder commented 2 years ago

It seems that in newer versions of React(e.g: 18.x.x), you need to use PropsWithChildren to wrap your function or else there will be Property 'children' does not exist on type 'IntrinsicAttributes & Props' error.

reference: Answer from StackOverflow