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
Server-side rendering support #15
Comments
We are working on it 😄 We have been talking about it internally and are trying to figure out a great and straightforward way to implement it. Since the router is in charge of handling the resolves for each state, the best implementation would be to resolve the data on the server side, serialize it, send it to the client and re-hydrate the router state with the data, otherwise we would fetch all data twice. This implementation has its limits as you would be able to only declare resolves that can be serialized. So no class instances or stuff like that. I'll update here as soon as we have anything working ;) |
Glad to hear! This is the library I'm currently using with react-router: https://github.com/makeomatic/redux-connect Using both redux and react-router along with redux-connect is a solution working for me for both client and server. Maybe have something similar, or maybe letting the router have plugins for specific kinds of stores like redux. The other one I was looking at was react-resolver, but it doesn't support redux out of the box: https://github.com/ericclemmons/react-resolver The only thing without using classes is you would have to have a nested component at the top level if you wanted to setState. Maybe that could be fine if it is just documented well. Decorators as resolvers makes it easy to see whats being injected into the props of the component but not necessarily required. Really like what you guys are doing! Miss ui-router to be honest. This is the boilerplate I started with for my app which emphasizes the folder by feature/routes are folders (called fractal pattern in React but has been around for a while in Angular community thanks to John Papa): https://github.com/davezuko/react-redux-starter-kit Any kind of time frame you guys are looking at for a 1.0? |
Any updates on this? |
I have to be honest, I haven't work specifically on this feature, but we have made big changes since that should render this a lot easier to implement. I'll keep you posted! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. This does not mean that the issue is invalid. Valid issues may be reopened. Thank you for your contributions. |
This issue has been automatically closed. |
Server-side rendering support is a major feature to the react setup, so would be nice to have that, too.
The text was updated successfully, but these errors were encountered: