-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Access state in createAsyncAction #244
Comments
how about const actionFactory = (authToken) => ({
return {
fetchUserInfoAsync = createAsync(['FETCH_USER_INFO', ...)
}
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a real problem or use-case?
Yes. I want to access to the state in my action creator in order to inject a jwt in my actions.
This use case is pretty common if your app uses an API that require an authorization token (app like facebook or instagram). Instead of getting the token and dispatching it in the action manually:
Describe a solution including usage in code example
It would be better if the authToken can be injected in the action creator:
Who does this impact? Who is this for?
People using an API that require an authorization token
Describe alternatives you've considered (optional)
Additional context (optional)
The text was updated successfully, but these errors were encountered: