baseweb icon indicating copy to clipboard operation
baseweb copied to clipboard

feat: use `ForwardRefRenderFunction`

Open simPod opened this issue 3 years ago • 4 comments

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

simPod avatar Apr 08 '22 08:04 simPod

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

codesandbox-ci[bot] avatar Apr 08 '22 08:04 codesandbox-ci[bot]

Thank you. We can drop react v16 and set min to v17. Can you please update the package.json in this PR?

chasestarr avatar Apr 12 '22 18:04 chasestarr

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 avatar May 05 '22 20:05 KevinGrandon

@KevinGrandon I did few changes, you can try to finish, not sure how to handle remaining errors properly.

simPod avatar May 06 '22 08:05 simPod

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

chasestarr avatar Oct 04 '22 17:10 chasestarr