Open daniel-ac-martin opened 2 weeks ago
Unfortunately, this appears to break hydration. (It resorts to re-rendering from scratch.) This doesn't seem to happen under React v16. The error is a bit misleading (it complains about the first DOM element that is rendered, so matter what it is, even when the output is identical between client and server.)
Failed #5378
•
71108d500f: component-test-helpers: Update testing-library v14
Project |
NotGovUK
|
Branch Review |
react18
|
Run status |
Failed #5378
|
Run duration | 12m 05s |
Commit |
71108d500f: component-test-helpers: Update testing-library v14
|
Committer | Daniel A.C. Martin |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
1
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
0
|
⚠️ You've recorded test results over your free plan limit. Upgrade your plan to view test results. | |
View all changes introduced in this branch ↗︎ |
I wonder if it is something in the app-composer that causes this. (Previously the error indicated Suspense was the issue, and we were switching between Suspense and Fragment depending on client vs server. - As an aside, we should also consider using Suspense on both sides as it is supposed to support SSR now.)
There's also a possibility that upgrading one of the components in app-composer could fix this.
Updates to React v18, which is a breaking change.
Note: This is a breaking change as consumer will have to update react and react-dom separately from our packages.