brocoders / redux-async-connect

It allows you to request async data, store them in redux state and connect them to your react component.
645 stars 103 forks source link

Possible to run reduxAsyncConnect in order? #37

Closed x1a0 closed 8 years ago

x1a0 commented 8 years ago

Thanks for this project.

In my project I always load user's data on all pages - so in the very root component () there is a reduxAsyncConnect method which does that. Then in all children component they also fetch data they need - but assume user's data is loaded.

However this project seems to flatten all reduxAsyncConnect and run them simultaneously.

Would it be better if it keeps the depending tree based on component tree?

sars commented 8 years ago

Hi @x1a0, In my project i solved this problem like this: https://github.com/sars/appetini-front/blob/appetini/src/routes.js#L23

Right now there is no possibility to invoke reduxAcyncConnect in sequence ...

x1a0 commented 8 years ago

@sars Thanks - This is helpful. Maybe this is the right way to solve such problem as user is sort of a special data.