react/scripts
Sebastian Markbåge 50addf4c0e
Refactor Partial Hydration (#16346)
* Move dehydrated to be child of regular SuspenseComponent

We now store the comment node on SuspenseState instead and that indicates
that this SuspenseComponent is still dehydrated.

We also store a child but that is only used to represent the DOM node for
deletions and getNextHostSibling.

* Move logic from DehydratedSuspenseComponent to SuspenseComponent

Forked based on SuspenseState.dehydrated instead.

* Retry logic for dehydrated boundary

We can now simplify the logic for retrying dehydrated boundaries without
hydrating. This is becomes simply a reconciliation against the dehydrated
fragment which gets deleted, and the new children gets inserted.

* Remove dehydrated from throw

Instead we use the regular Suspense path. To save code, we attach retry
listeners in the commit phase even though technically we don't have to.

* Pop to nearest Suspense

I think this is right...?

* Popping hydration state should skip past the dehydrated instance

* Split mount from update and special case suspended second pass

The DidCapture flag isn't used consistently in the same way. We need
further refactor for this.

* Reorganize update path

If we remove the dehydration status in the first pass and then do a second
pass because we suspended, then we need to continue as if it didn't
previously suspend. Since there is no fragment child etc.

However, we must readd the deletion.

* Schedule context work on the boundary and not the child

* Warn for Suspense hydration in legacy mode

It does a two pass render that client renders the content.

* Rename DehydratedSuspenseComponent -> DehydratedFragment

This now doesn't represent a suspense boundary itself. Its parent does.

This Fiber represents the fragment around the dehydrated content.

* Refactor returns

Avoids the temporary mutable variables. I kept losing track of them.

* Add a comment explaining the type.

Placing it in the type since that's the central point as opposed to spread
out.
2019-08-12 15:58:38 -07:00
..
babel Babel 7 (#16297) 2019-08-08 17:46:35 -07:00
bench Update Readme (#14176) 2018-11-12 16:25:32 +00:00
circleci Parallelizes the build script across multiple processes (#15716) 2019-05-29 14:34:50 -07:00
error-codes Refactor Partial Hydration (#16346) 2019-08-12 15:58:38 -07:00
eslint Refactor ESLint configuration to enable better IDE integration (#13914) 2018-11-08 17:56:35 +00:00
eslint-rules Lint rule for unminified errors (#15757) 2019-05-29 11:29:04 -07:00
flow Move ReactFiberErrorDialog RN fork into RN itself (#16141) 2019-07-16 09:38:14 +01:00
git Remove leftover env variable logic in pre-commit hook 2015-09-01 14:35:47 -07:00
jest Babel 7 (#16297) 2019-08-08 17:46:35 -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 Drop the year from Facebook copyright headers and the LICENSE file. (#13593) 2018-09-07 15:11:23 -07:00
print-warnings Babel 7 (#16297) 2019-08-08 17:46:35 -07:00
release Release script supports publishing a subset of packages (#16338) 2019-08-09 13:12:00 -07:00
rollup Upgrade ESLint so we can use JSX Fragment syntax (#16328) 2019-08-09 12:59:02 -07:00
shared [Fire] Remove unused React fire fork (#16046) 2019-07-03 11:05:28 +01:00
tasks Switch to @sizebot token (#13622) 2018-09-11 21:06:44 +01:00
authors AUTHORS 2013-09-09 23:42:54 -07:00