looker-open-source / components

Looker's UI Components, Design Infrastructure and more
https://components.looker.com
MIT License
62 stars 31 forks source link

Adding future React.FC Provider support for typescript and react-18 users. #2976

Closed taystack closed 1 year ago

taystack commented 1 year ago

What changed?

React 18 React.FC no longer supports implicit children. Developers using React 18 and typescript will get type errors when using the ComponentsProviders. This PR adds React.PropsWithChildren<{}> to the providers' props to add future support for React 18 users.

Issue https://github.com/looker-open-source/components/issues/2975

taystack commented 1 year ago

@AprilArcus thanks for the review. Hopefully I addressed any blocking issues from your end. Currently we're (work) preparing to use my fork to unblock this issue in our CI typescript workflow. If there is anything I can do on my end to help move this along I'd be happy to help.

mdodgelooker commented 1 year ago

@taystack thank you for this contribution. I'm closing it now as the removal of React.FC has been completed in our internal source-of-truth repo, synced to this repo, and published to npm.