react/scripts
Sebastian Markbåge 3ef31d196a
Implement Partial Hydration for Activity (#32863)
Stacked on #32862 and #32842.

This means that Activity boundaries now act as boundaries which can have
their effects mounted independently. Just like Suspense boundaries, we
hydrate the outer content first and then start hydrating the content in
an Offscreen lane. Flowing props or interacting with the content
increases the priority just like Suspense boundaries.

This skips emitting even the comments for `<Activity mode="hidden">` so
we don't hydrate those. Instead those are deferred to a later client
render.

The implementation are just forked copies of the SuspenseComponent
branches and then carefully going through each line and tweaking it.

The main interesting bit is that, unlike Suspense, Activity boundaries
don't have fallbacks so all those branches where you might commit a
suspended tree disappears. Instead, if something suspends while
hydration, we can just leave the dehydrated content in place. However,
if something does suspend during client rendering then it should bubble
up to the parent. Therefore, we have to be careful to only
pushSuspenseHandler when hydrating. That's really the main difference.

This just uses the existing basic Activity tests but I've started work
on port all of the applicable Suspense tests in SelectiveHydration-test
and PartialHydration-test to Activity versions.
2025-04-22 21:00:30 -04:00
..
babel [flags] remove enableRemoveConsolePatches (#32425) 2025-02-24 10:00:22 -05:00
bench Don't minify symbols in production builds (#28881) 2024-04-20 11:23:46 -04:00
ci [ci] Try to parallelize devtools builds (#32266) 2025-01-30 11:49:04 -05:00
devtools fix[scripts/devtools/publish-release]: parse version list instead of handling 404 (#31087) 2024-09-30 17:07:54 +01:00
error-codes Implement Partial Hydration for Activity (#32863) 2025-04-22 21:00:30 -04:00
eslint [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
eslint-rules [tests] Remove to*Dev matchers (#31989) 2025-01-07 14:17:14 -05:00
flags Add --cleanup option to flags script to show groups of flags by status (#31762) 2024-12-13 15:49:06 -05:00
flow [RN] Map Fabric priorities to reconciler priorities correctly (#32847) 2025-04-10 17:35:15 +01:00
git Remove leftover env variable logic in pre-commit hook 2015-09-01 14:35:47 -07:00
jest Fix ownerStackLimit feature gating for tests (#32726) 2025-03-26 12:01:05 -04:00
perf-counters [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
prettier [prettier] Combine compiler and runtime configs 2024-06-21 12:05:29 -04:00
print-warnings Disable consoleWithStackDev Transform except in RN/WWW (#30313) 2024-07-12 14:39:38 -04:00
react-compiler [ci] Cache runtime and compiler only for test runs (#32608) 2025-03-13 22:21:35 -04:00
release [release] Don't lookup build-info.json when updating version numbers (#32778) 2025-03-28 14:35:29 -04:00
rollup [eprh] Don't transpile to es5 (#32669) 2025-03-19 11:49:42 -04:00
shared [Flight Parcel] Align with more recent changes (#31741) 2024-12-12 14:39:25 -05:00
tasks [ci] Cleanup more references to circleci 2024-07-29 19:18:03 -04:00