Open ericclemmons opened 9 years ago
+1 looking forward to the redux example
Sorry to turns this to a "+1 thread", but +1 from me as well. Though I'm probably going to start (trying to) implementing react-resolver + redux in next few weeks so if no one else have done the example before that, I might be able to put together something... though I'm pretty new to React ecosystem, so not sure if my examples will be any good :D
It's cool, I'm using:
https://chrome.google.com/webstore/detail/github-%201s/lddfkkebajnpiicnpfamebilmhamkeme
:)
Which...actually didn't work haha.
Thanks for your support! I'll be doing some TDD tonight for this (Tequila Driven Development).
@ericclemmons best kind of development right there! lol
Hahaha I might be doing npm install redux --save
& keeping up the Ballmer Peak with some Beer Driven Development as well :D
well in that case, +1
This should also how how to handle #82
I'm using redux with redux-api-middleware. With @connect
I can easily bind my store to the components but I haven't found a nice way to provide the initial state for the store. I'm also using (read: trying to use) server-side rendering with multiple routes (react-router
) and code splitting so I was thinking if react-resolver
could solve the problem to populate the state based on current route component. :)
Just sharing my thoughts. +1
A better solution might be to use redux-promise (more discussion: redux #99). Using that I think it would be possible to call the needed async actions on @resolve
and return an asyncAction()
or Promise.all(asyncActions)
. That way the component will have its initial data in redux store before rendering. Somewhat similar what @erikras does with fetchData. I will try this later.
@RanzQ that's a great idea. maybe it'd be possible to chain @connect with @resolve so that the props passed to @resolve have the action creators and state necessary for loading data. Using this strategy would require us to somehow pass the state/creators through to the react component.
+1
+1
So is there any example usage with redux?
@AriaFallah I use https://github.com/Rezonans/redux-async-connect ... It works good with redux
@sars Thanks! I'll take a look
Using v1:
Also, this should be a form example, IMO. Something to warrant the router, but also having a store.