-
Notifications
You must be signed in to change notification settings - Fork 114
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
Store Dependencies #49
Comments
I assume you're using React Router? Have you checked out the async-data example? https://github.com/rackt/react-router/blob/master/examples/async-data/app.js In that example, the static method This pattern is pretty useful, so I wrote a helper: https://github.com/acdlite/flummox-isomorphic-demo/blob/master/src/shared/performRouteHandlerStaticMethod.js For complex dependencies like the one you described, you just have to make sure you chain your async operations together using either Server-side data fetching is the least developed part of Flux in my opinion, which is why I'm so pumped for Relay. |
Yeah that's the current setup I have also. React router + static route handler like in your example. The problem I had was making one route handler wait on another when you have sub-routes. Anyway I have an idea that I might try. Yeah Relay looks awesome and makes more sense then Flux for fetching data that doesn't change much over time. I'm also excited about it but the problem will be implementing it with current "legacy" backends. |
I have a rather newbie question. I think it could be general to how Flux works but not specific to Flummox.
How could I handle the case when in order to call an action on a store i need a piece of data from another store? The problem arises when doing server side rendering. To be more precise: I have two nested route handlers, each one needs to get some data before rendering but the child handler data fetcher depends on whatever data is fetched by the parent handler.
The text was updated successfully, but these errors were encountered: