Open giedrius-timinskis opened 8 years ago
Would you mind sharing your fork? We could probably help you from there, and hopefully that will inspire a redux starter-kyt.
https://github.com/giedrius-timinskis/kyt-starter-universal/commit/f2f04d88ff023e1b38c954f0172b7a7e00050b8f This is the version that seems to work. The implementation sets up the initial state server-side and then passes that state into the client side.
Nice!
I haven't done a lot of Redux work but I really like the idea of following the Ducks file pattern.
I'd love to hear your - or anyone's - thoughts on that.
We've used Ducks before and it's not hard to wrap your head around. I'd love to see this as an option in the server-side and non-server-side starter kits.
There are two parts to solve , we faced more issues with Server side rendering + Redux
Complexity is primarily with component/router life cycle hooks with Flux architecture.
Solved # 1 by Injecting reducer for each route - http://stackoverflow.com/questions/32968016/how-to-dynamically-load-reducers-for-code-splitting-in-a-redux-application
Still Solving # 2 by different approach - static fetch call per component , resolving nested reducer. Finally end up keeping the reducer normalized rather deeply nested. https://www.npmjs.com/package/redux-async-connect
Over all it requires more architecture work to handle , HTTP errors , keeping client & server STATE in sync , exception handling globally , authentication , authorization , showing spinners :-) etc
Thanks a lot for putting all the config together and made Developers life easy.
@giedrius-timinskis, I created a quick & dirty redux example, using Ducks, as suggested by @mrmckeb. Let me know if you'd like a pr into your branch
https://github.com/oscar-g/kyt-starter-universal/tree/dev-redux-example
@oscar-g Looks good! Let's get @mrmckeb to review as well.
Hello,
This is more of a question/request than an issue. Has anyone done Redux implementation with the universal kit? I'm currently trying to implement one and keep running server-side implementation issues.