Re:Next.js – A small framework for server-rendered universal...
by idbehold on Tuesday October 25, 2016 @04:47PM
(#12791524)
Okay, let's say I put the actual fetch() inside a redux "action creator" how am I fetching that data server-side? How does some arbitrary route know that a nested component needs to fetch() and then populate your store before rendering? And remember, the fetch() in the "action creator" is still trying to hit a relative route.
[ Parent
| on HN ]
Re:Next.js – A small framework for server-rendered universal...
by faceyspacey on Tuesday October 25, 2016 @05:19PM
(#12791731)
you call the action creator and dispatch its results to you redux store before rendering. For "arbitrary" routes, you design your application in a way that just by the pathname, query parameters, etc, you know exactly what data to get for the whole component tree. ..Don't use a relative route.
Re:Next.js – A small framework for server-rendered universal...
by idbehold on Tuesday October 25, 2016 @06:08PM
(#12792173)
> For "arbitrary" routes, you design your application in a way that just by the pathname, query parameters, etc, you know exactly what data to get for the whole component tree.
That entirely defeats the purpose of an isomorphic/universal React application.