-
Notifications
You must be signed in to change notification settings - Fork 119
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
Where is the action's status set to "success" or "error"? #45
Comments
The documentation is wrong: the code implements the current FSA spec, success would be the absence of error: true. |
Absence of error can also mean a request has never been initiated. I wrote additional code to aid with this that basically decorated the FSA spec. IMO the spec is not verbose enough and should accommodate these additional states. |
redux-promise doesn't dispatch when it initiates the request though, so your reducer will not receive an action when it's fetching, only once it's completed or failed. You might want to try a different middleware (like https://github.com/pburtchaell/redux-promise-middleware) for an approach that accommodates knowing when something's fetching. |
@mateomurphy ,u are right, i write a demo and test it, in my case there is no 'status', the right result is :
so we just can only use |
In your documentation it says:
I see no other mention of this status field anywhere in the code of this library and I have not seen any field in my resolved action in my testing of this library.
There is a field called
error
but I am more interested in knowing whether there has been a successful request.Does it still exist or perhaps this is legacy from and earlier spec of FSA?
I ask b/c I am looking for a way to use FSA to determine if an action is in the process of making a request (e.g.
isFetching
) how to do this?The text was updated successfully, but these errors were encountered: