Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Lazy Context Propagation #118

Open
wants to merge 1 commit into
base: master
from

Conversation

@gnoff
Copy link

commented Jun 21, 2019

View Rendered Text

This RFC describes a new Context Propagation implementation which has improved performance characteristics in certain cases by using the work React is already going to do before resorting to explicit context dependencies searches. This lazy implementation also has qualitative differences from the current eager approach which may allow new kinds of context update bailouts to be implemented

It does not modify the public API of React in any way.

Motivation

These two changes allow for propagation tree traversal to be somewhere between 0 and 1...

...unmounts will now happen before context propagation begins.

...will allow for some interesting new APIs.

Addendum

Example: https://codesandbox.io/s/react-lazy-context-propagation-67e5j
Implementation: https://github.com/gnoff/react/pull/4/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.