-
Notifications
You must be signed in to change notification settings - Fork 0
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
Overcome design problem with shouldRun #21
Comments
Maybe the best idea is to drop
|
Maybe make the saga responsible for managing loading states (which are the main reason why |
Detailed proposal:
We should also warn users of the library not to do things they might regret on |
Or we could extract the shouldRun in a custom action/saga that dispatches |
-> we need to add a CANCEL_LOADING action to crudActionsNamespace |
Currently
shouldRun
andcrudReducer
don't play nice together.shouldRun
runs after thecrudReducer
has already cleaned up some parts of the store, so the data is invalid.Proposal:
// ENSURE_SINGLE
// FETCH_SINGLE
Running
ensure
will do the check withshouldRun
and then result in eitherFETCH_SINGLE
or nothing. UsingfetchSingle
directly will avoid theshouldRun
check and will "force" the saga to run.The
ensure
action should only be generated incrudActionsNamespace
and not in the more genericactionsNamespace
.The text was updated successfully, but these errors were encountered: