Closed itsjimbo closed 8 years ago
Why not having a reducer for each tab?
Sure, that would work, just wondering as a thought experiment if the tabs were created dynamically
Any feedback on your problem ?
I forgot to mention that the original request is available as an argument to the ok
and error
dispatch function. This should help you solve this issue.
That works! Thanks @FredericHeem
I am new to redux-act-async, just wondering the best way to put dynamic properties on the state, for example if I had 3 tabs to populate some data, that make a rest call with some id, they would call an api...
And if I define some module that may look like the following...
How can I attach meta data to the REST promise so that the reducer knows which tab to set the data property?
Ideally the callback should have the request somewhere in there so one can reference the original parameters and thus set properties accordingly...
AFAIK, the reducer returns with the data as the payload, but there is not any knowledge of the id which requested it, but I am probably missing something simple.. Cheers