baseweb
baseweb copied to clipboard
feat: use `ForwardRefRenderFunction`
Fixes #4900
Description
RefForwardingComponent is deprecated in favor of ForwardRefRenderFunction
I'm afraid this will have to wait until we drop v16 since ForwardRefRenderFunction is not available there.
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/2034c45ba9c4ac8524a58e2c8a84eb449d2af339/types/react/index.d.ts#L541-L545
Scope
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit e6e92c5b1bc660681e4e523d08eddeabbbd6dce2:
| Sandbox | Source |
|---|---|
| Basic usage | Configuration |
Thank you. We can drop react v16 and set min to v17. Can you please update the package.json in this PR?
Hey @simPod, thanks for throwing this up. Any interest in fixing the few typescript errors uncovered by the upgrade? Looks like the majority of them could be fixed by adding some additional checks. Otherwise I'm happy to contribute on top of your start.
@KevinGrandon I did few changes, you can try to finish, not sure how to handle remaining errors properly.
We've switched our internal react code to v18/TS and everything seems to be type-checking fine. Closing this in-progress pr to clean up the list. Please let us know if this is still an issue