-
-
Notifications
You must be signed in to change notification settings - Fork 324
Track contexts in hooks as state #787
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
Conversation
a4d810f
to
d4c3dbc
Compare
components which are newly added to the layout after the initial render do not have access to contexts. we solve this by tracking life cycle hooks in stack and copying the context providers from parent to child hooks. we also change how contexts are implemented - instead of needing a create_context function which returns a new Context class, we just return a Context object that constructs a ContextProvider component. the earlier implementation was too clever and did not add anything for it.
d4c3dbc
to
b0a9b06
Compare
75130e8
to
f6b326e
Compare
@Archmonger, thoughts on removing |
I am completely indifferent to that change. At the moment, you and I are the only ones using it. And I don't expect many people to create custom context hooks for IDOM in the future. |
I decided not to do that. Came up with a nice solution using functions. I'm going to remove the |
61b4dd6
to
5174ec4
Compare
5174ec4
to
60feda7
Compare
Description
closes: #789
components which are newly added to the layout after the initial render do not have access to contexts. we solve this by tracking life cycle hooks in stack and copying the context providers from parent to child hooks.
Checklist:
Please update this checklist as you complete each item:
changelog.rst
has been updated with any significant changes.