Skip to content
This repository was archived by the owner on Oct 30, 2025. It is now read-only.

Conversation

@BobbyWhiskey
Copy link

Issue:
When converting components to Typescript, we had to do "import React" in every component.

What I did

With the release of React 17 we can use the new JSX Transform. With that modification, the package babel-plugin-react-require was not required anymore.
Here is the documentation i used:
https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html

How to test

  • New Typescript components do not require to import React.
  • The documentation of the typescript components props is reflected correctly in the Storybook

Note: We can't merge this in branch conversion_ts yet because there are still issues with unit tests caused by the conversion to Typescript.

@alexasselin008 alexasselin008 merged commit 2d5b0c1 into workleap:conversion_ts Feb 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants