-
Notifications
You must be signed in to change notification settings - Fork 780
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
v2: automatically calling functions in component trees #840
Comments
hm, i am almost done with the rewrite, only one blocking issue left: i have the Pre module, which does syntax highlighting, and it has a global theme shared between all Pre's. i used to set the global state.pre.theme value and access it in the Pre component without the user of the module declaring the state explicitly eg:
which i would expand internally to:
looking through the codebase i see no way to add a StateProvider component (pseudocode)
(Without initializing it in app.render to get the state, which would be a pretty ugly hack) but, looking at subscriptions code, i see that they get the state passed to
am i correct that this would be my way to subscribe to state changes? |
actually, thinking about this a bit more, |
in v1 i could do:
and it would execute my OtherComponent function with (state, actions) as arguments.
maybe v2 should call this function (maybe even with empty props object)?
also, kinda related, there is no passing down full state to components anymore, is there?
The text was updated successfully, but these errors were encountered: