-
Notifications
You must be signed in to change notification settings - Fork 124
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
Sharing state from root to all nested components #95
Comments
React's context feature solves that problem, although i don't have an example of using it from Rum. |
My derivatives library linked in the Rum Readme exports some of its
|
Here is the relevant source code. Didn't know about |
Thanks for all the help guys. Looks like context is exactly what I need. I can build my abstractions over that. Thanks for linking that source as well. I'll be studying it. Closing this issue. |
In Om, mounting the component root with
om/root
also allows for supplying shared state which can then be accessed by any component under the root component viaom/get-shared
. This allows for global data and services to be set without resorting to global state since all state is still local to the mounted component tree. This allows, for example, multiple mounts of the same app on the same page with "global" data and services independent from each other.Would it be possible to include something similar to rum? Or are there any suggested patterns to get the same result?
The text was updated successfully, but these errors were encountered: