eps1lon/types-react-codemod

Implicit children patch for react 18

Closed this issue · 1 comments

Sebastian,

As you may know, the implicit children codemod has several defects. In the React community, this remains one of the most significant issues, with hundreds of reported issues in apps and external npm libraries. The problem is especially pronounced in Monorepos that host hundreds of applications. Could you provide your recommendations for creating a patch using patch-package and re-enabling implicit children?

Is it OK to not have the correct v18 @types (with reenabled implicit) for React v18 ? Could this potentially cause issues with concurrency or transitions? Are there any anticipated problems in the future? Please keep us informed. Your suggestions are highly valued.

I know you tried to create one here which does not work . Can you suggest any other alternatives ?

As you may know, the implicit children codemod has several defects.

Could you clarify which those are? Some we may already track, some may be unknown

Is it OK to not have the correct v18 https://github.com/types (with reenabled implicit) for React v18 ?

This is not supported so any guarantees about type-checking correctness are gone.

I know you DefinitelyTyped/DefinitelyTyped#59751 one here which does not work . Can you suggest any other alternatives ?

I'm not aware of alternatives beyond patching it back in. Since this is not recommended, we won't provide a patch since this may break with any new release of the React types. You can take a look at https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56210/files to understand what you may have to revert to get implicit children back.

In the React community, this remains one of the most significant issues, with hundreds of reported issues in apps and external npm libraries.

This is not my impression. It was a breaking change that took some time but as far as I know, latest versions of popular libraries are now all compatible. Which libraries are still not up-to-date?