react/scripts
Andrew Clark 52c393b5d2
Revert to client render on text mismatch (#23354)
* Refactor warnForTextDifference

We're going to fork the behavior of this function between concurrent
roots and legacy roots.

The legacy behavior is to warn in dev when the text mismatches during
hydration. In concurrent roots, we'll log a recoverable error and revert
to client rendering. That means this is no longer a development-only
function — it affects the prod behavior, too.

I haven't changed any behavior in this commit. I only rearranged the
code slightly so that the dev environment check is inside the body
instead of around the function call. I also threaded through an
isConcurrentMode argument.

* Revert to client render on text content mismatch

Expands the behavior of enableClientRenderFallbackOnHydrationMismatch to
check text content, too.

If the text is different from what was rendered on the server, we will
recover the UI by falling back to client rendering, up to the nearest
Suspense boundary.
2022-02-24 00:23:56 -05:00
..
babel Remove object-assign polyfill (#23351) 2022-02-23 19:34:24 -05:00
bench Bump ecstatic from 2.2.1 to 2.2.2 in /scripts/bench (#20468) 2021-06-29 16:53:31 -04:00
circleci Console message fixed for devtools (#23067) 2022-01-05 11:45:45 -05:00
devtools Console message fixed for devtools (#23067) 2022-01-05 11:45:45 -05:00
error-codes Revert to client render on text mismatch (#23354) 2022-02-24 00:23:56 -05:00
eslint Migrate from CLIEngine to the new ESLint class. (#22756) 2021-11-18 21:12:18 +00:00
eslint-rules Remove unused react-internal/invariant-args ESLint rule. (#22778) 2021-11-16 20:11:20 +00:00
flow React Native raw event EventEmitter - intended for app-specific perf listeners and debugging (#23232) 2022-02-07 18:34:01 -08:00
git Remove leftover env variable logic in pre-commit hook 2015-09-01 14:35:47 -07:00
jest DevTools: Timeline profiler refactor 2022-01-28 13:09:28 -05:00
merge-fork Improve DEV errors if string coercion throws (Temporal.*, Symbol, etc.) (#22064) 2021-09-27 10:05:07 -07:00
perf-counters Drop the year from Facebook copyright headers and the LICENSE file. (#13593) 2018-09-07 15:11:23 -07:00
prettier DevTools: Update named hooks match to use column number also (#21833) 2021-07-08 16:12:22 -04:00
print-warnings Add onRecoverableError option to hydrateRoot, createRoot (#23207) 2022-02-04 07:57:33 -08:00
release Add --no-show-signature to "git show" commands (#23038) 2022-01-11 12:14:08 -05:00
rollup Remove object-assign polyfill (#23351) 2022-02-23 19:34:24 -05:00
shared Remove deprecated wildcard folder mapping (#23256) 2022-02-09 11:37:17 -08:00
tasks Migrate from CLIEngine to the new ESLint class. (#22756) 2021-11-18 21:12:18 +00:00
yarn chore: upgrade to jest 24 (#15778) 2019-10-03 22:44:18 +05:30
authors AUTHORS 2013-09-09 23:42:54 -07:00