You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
opening new issue based on the discussions in #79.
Essentially my use-case is to chain actions "update -> fetch list", "delete -> fetch list". I use code generation heavily to create redux-api's and from that perspective postfetch has been quite useful. However, the problem with postfetch is it happens asynchronously from the first action, i.e. update finishes and during a small window the list is not yet updated (depending on client's speed etc).
Initially I started by chaining actions, but that quickly became confusing due to the "updateAndFetchList" being having to be declared under "update", rather than the "list" endpoint (correct me if I am wrong but calling "cb" in a helper executes against the endpoint the helper is defined against).
I guess what I would be after is a helper where the "update" would stay in "loading" state until all the promises / actions have resolved. Currently I am using a combination of redux-saga and postfetch, which seems to be overcomplicating the solution.
Hi. It interesting question. At this moment I don't see another way with current implementation,but At this moment I don't have access to computer. When I'll have, we'll come back to discussion
Hey,
opening new issue based on the discussions in #79.
Essentially my use-case is to chain actions "update -> fetch list", "delete -> fetch list". I use code generation heavily to create redux-api's and from that perspective postfetch has been quite useful. However, the problem with postfetch is it happens asynchronously from the first action, i.e. update finishes and during a small window the list is not yet updated (depending on client's speed etc).
Initially I started by chaining actions, but that quickly became confusing due to the "updateAndFetchList" being having to be declared under "update", rather than the "list" endpoint (correct me if I am wrong but calling "cb" in a helper executes against the endpoint the helper is defined against).
I guess what I would be after is a helper where the "update" would stay in "loading" state until all the promises / actions have resolved. Currently I am using a combination of redux-saga and postfetch, which seems to be overcomplicating the solution.
Here is one of the generated wrappers: https://gist.github.com/mkoppanen/3199794a9ce653e5a9f238ec3d6b970f
The text was updated successfully, but these errors were encountered: