Skip to content
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

Redux Example #61

Open
ericclemmons opened this issue Aug 10, 2015 · 16 comments
Open

Redux Example #61

ericclemmons opened this issue Aug 10, 2015 · 16 comments
Milestone

Comments

@ericclemmons
Copy link
Owner

Using v1:

http://gaearon.github.io/redux/

Also, this should be a form example, IMO. Something to warrant the router, but also having a store.

@ericclemmons ericclemmons added this to the v2 milestone Aug 10, 2015
@josebalius
Copy link

+1 looking forward to the redux example

@aripalo
Copy link

aripalo commented Aug 21, 2015

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

@ericclemmons
Copy link
Owner Author

@ericclemmons
Copy link
Owner Author

Which...actually didn't work haha.

Thanks for your support! I'll be doing some TDD tonight for this (Tequila Driven Development).

@josebalius
Copy link

@ericclemmons best kind of development right there! lol

@aripalo
Copy link

aripalo commented Aug 21, 2015

Hahaha I might be doing npm install redux --save & keeping up the Ballmer Peak with some Beer Driven Development as well :D

@arush
Copy link

arush commented Aug 26, 2015

well in that case, +1

@ericclemmons
Copy link
Owner Author

This should also how how to handle #82

@RanzQ
Copy link

RanzQ commented Sep 19, 2015

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

@RanzQ
Copy link

RanzQ commented Sep 19, 2015

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.

@jachenry
Copy link

@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.

@anaibol
Copy link

anaibol commented Oct 22, 2015

+1

1 similar comment
@sars
Copy link

sars commented Dec 31, 2015

+1

@AriaFallah
Copy link

So is there any example usage with redux?

@sars
Copy link

sars commented Feb 3, 2016

@AriaFallah I use https://github.com/Rezonans/redux-async-connect ...
It works good with redux

@AriaFallah
Copy link

@sars Thanks! I'll take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants