-
Notifications
You must be signed in to change notification settings - Fork 47.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detect refreshes by comparing to previous parent
Removes the fresh/stale distinction from the context stack and instead detects refreshes by comparing the previous and next parent cache. This is closer to one of the earlier implementation drafts, and it's essentially how you'd implement this in userspace using context. I had moved away from this when I got off on a tangent thinking about how the cache pool should work; once that fell into place, it became more clear what the relationship is between the context stack, which you use for updates ("Here"), and the cache pool, which you use for newly mounted content ("There"). The only thing we're doing internally that can't really be achieved in userspace is transfering the cache across Suspense retries. Kinda neat.
- Loading branch information
Showing
17 changed files
with
507 additions
and
982 deletions.
There are no files selected for viewing
340 changes: 125 additions & 215 deletions
340
packages/react-reconciler/src/ReactFiberBeginWork.new.js
Large diffs are not rendered by default.
Oops, something went wrong.
340 changes: 125 additions & 215 deletions
340
packages/react-reconciler/src/ReactFiberBeginWork.old.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.