-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Where/when to fetch data? #80
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
Comments
It's a good approach. I'd rather have the function on a static method of the handler, feels better to me than pulling in many fetch functions in the route config. We will absolutely support this use case in one form or another soon. Sent from my iPhone
|
Let's continue this discussion in #57. |
In issue #38 it was suggested to discuss data fetching in another issue. I'll start:
Right now I've written my components such that the top-level components fetch data in a componentDidMount method. This is straighforward and works well for now, however, it won't work for server rendering, which the project I'm working on is going to need soon.
After already getting set up with react-nested-router, I came across RRouter, which has a fairly sane approach to this: http://andreypopp.github.io/rrouter/data-fetching.html It seems to me that this same approach could be applied to react-nested-router.
Thoughts?
The text was updated successfully, but these errors were encountered: