PublicDataWorks / complaint-manager

Apache License 2.0
4 stars 0 forks source link

Investigate how difficult it would be to upgrade to React 17 or 18 #594

Closed claireholt-tw closed 2 months ago

claireholt-tw commented 2 months ago

Business Context

Our current React version is 16.1, which is several years behind the most recent version. This makes us hard to use newer features like the MUI X Data Grid. We want to look into seeing how difficult it would be to upgrade our React version.

Definition of Done

We're able to give a rough estimate of how complex upgrading would be. We'll also know which packages have breaking changes that will require updating.

Timebox

1 Day

Acceptance Criteria

Do research/play around and answer:

Notes:

N/A

claireholt-tw commented 2 months ago

Option 1: Upgrade from React 16 to React 18 (the latest version)

Client Tests - 97/299 Fail, we suspect about 80 of these fails are from Enzyme testing library Image

Server tests: 9/220 Failed, all with the same error message:

Image

Image

Pact client tests pass, pact server test failed.

Image

Option 2: Upgrade from React 16 to React 17

rd-huerta commented 2 months ago

Client test results:

7/299 failed Compared to 97/299 failures when using React 18 Screenshot 2024-04-29 at 3 28 11 PM

Server test results

Initially they failed: Screenshot 2024-04-29 at 3 35 00 PM We re-ran the failing tests and they passed: Screenshot 2024-04-29 at 3 37 47 PM

Pact Client Test Results

Screenshot 2024-04-29 at 3 53 58 PM

Pact Server Test Results

Screenshot 2024-04-29 at 3 56 32 PM

rd-huerta commented 2 months ago

Recommendations