Skip to content

Switch to React Concurrent Engine (stop supporting react<18) #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nlopin opened this issue Jun 3, 2022 · 3 comments
Closed

Switch to React Concurrent Engine (stop supporting react<18) #239

nlopin opened this issue Jun 3, 2022 · 3 comments
Assignees
Labels
breaking change Breaking changes that require a major version release
Milestone

Comments

@nlopin
Copy link
Contributor

nlopin commented Jun 3, 2022

As a result of the discussion #212

The new major should rely on the new React Engine. That means we need to change the minimum required version of react in package.json.

This also means we can use new React@18 hooks in the library

@nlopin nlopin added the breaking change Breaking changes that require a major version release label Jun 3, 2022
@nlopin nlopin added this to the Wave@2 milestone Jun 3, 2022
@lloydaf
Copy link
Contributor

lloydaf commented Jun 13, 2022

We have a lot of tech debt that we need to clean up in BOMT (and maybe even DMT) before we can migrate to react18. I think it's really nice to be able for wave to have react18 support, but dropping support for previous versions is concerning imo, because it wouldn't let older legacy projects to receive updates. Correct me if I misunderstood
@div-Leo @JanHamara do you have any thoughts?

@nlopin
Copy link
Contributor Author

nlopin commented Feb 23, 2023

I think we need to create some pressure from the library side of things to move things (DMT and BOMT) forward. It will be easier to justify the refactoring

@nlopin
Copy link
Contributor Author

nlopin commented Mar 13, 2023

@lloydaf and @martimalek researched the topic.

They've changed Wave's required react version to 18 and used a new useId hook in the useGeneratedId hook. Many essential components use this hook (Input, Textarea, Datepicker, etc.).

After that, they took the oldest project that we have (the DMT) and tried to use this react-18-only library in several scenarios:

  • The DMT uses the version of React that we're using now (16.8). The app crashed ❌
  • The DMT was promoted to React 18 without switching to the new engine. The app worked with a warning recommending switching to the new engine ✅
  • The DMT was promoted to React 18 with the new engine. All good ✅

The learning here is that we can support react 18 only with the new release. This will be a good driver for our applications to migrate to the latest version of react. The migration itself is not complicated, but the migrated app needs validation (manual or e2e)

More info in the internal issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Breaking changes that require a major version release
Development

No branches or pull requests

3 participants