Skip to content
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

Upgrade to React 18 #1445

Open
1 task
sam-glendenning opened this issue Oct 20, 2022 · 1 comment
Open
1 task

Upgrade to React 18 #1445

sam-glendenning opened this issue Oct 20, 2022 · 1 comment
Labels
datagateway-common datagateway-dataview Issues corresponding to the dataview component. This component supersedes datagateway-table datagateway-download Issues relating to the download plugin datagateway-search Issues relating to the search plugin dependencies Pull requests that update a dependency file enhancement New feature or request

Comments

@sam-glendenning
Copy link
Contributor

Description:
Should be tackled in conjunction with ral-facilities/scigateway#1205.

At present, we are running React v17.0.2. v18 has been out for some time now and we should upgrade to the latest stable version, which currently sits at v18.2.0.

React 18 brings a variety of improvements and changes. It's worth having a read of the official React 18 blog post to learn of the additions it has brought (some of these you may find useful going forward!).

Refer to the official React 18 migration guide while tackling this issue. It's important we eliminate any deprecated code that could interfere with the upgrade. For example:

image

And we don't want that, do we?

The only obstacle standing in React 18's way at the time this issue was created is the continuing use of Enzyme for tests (which aren't officially supported in React 17 and break entirely in React 18). Fortunately, work is underway to migrate all remaining Enzyme tests to React Testing Library. Once that work is completed, we can begin the upgrade to React 18.

Finally, all that's left to make sure of is that both SciGateway and DataGateway are upgraded to React 18 at the same time. This ensures all runs smoothly between the parent app and its plugins.

Acceptance criteria:

  • Upgraded to react ^18.2.0
@sam-glendenning sam-glendenning added enhancement New feature or request datagateway-download Issues relating to the download plugin datagateway-search Issues relating to the search plugin dependencies Pull requests that update a dependency file datagateway-common datagateway-dataview Issues corresponding to the dataview component. This component supersedes datagateway-table labels Oct 20, 2022
@sam-glendenning
Copy link
Contributor Author

While tackling this issue, also make sure that the following dependencies are updated:
#1423
#1424
#1356
#1392

louise-davies added a commit that referenced this issue Apr 5, 2023
- also, upgrade other libraries to support react 18
and fix anything that broke immediately
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datagateway-common datagateway-dataview Issues corresponding to the dataview component. This component supersedes datagateway-table datagateway-download Issues relating to the download plugin datagateway-search Issues relating to the search plugin dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant