First of all, I love this library and the patterns you guys are using. 👍👍
I'm trying to use redux to build an isomorphic app. It's working beautifully so far, except that I need to figure out how to wait until my stores have loaded (on the server) before returning the initial page load. Ideally, the loading should take place in the stores themselves, but when I call dispatch(userActions.load())
, the store has to return the new state (i.e. return { ...state, loading: true };
), so it can't return a promise to wait for. dispatch()
returns the action passed to it for some reason. I'd really like something like...
dispatch(someAsyncAction, successAction, failureAction) => Promise
...where the promise doesn't resolve until one of the other two actions is dispatched.
Is that the sort of thing that could be enabled with the middleware pattern?
Am I totally off base and there's a simple way to do this already?
Thanks.
davidrossjones, rublev, anaibol, lpirola, vladinator1000 and 12 more
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4