Skip to content

How to Dispatch action which depends on Http method #1901

Answered by kuncevic
mahmudabir asked this question in Q&A
Discussion options

You must be logged in to vote

Usually you do an API call from the action handler within a state, then depends on what API returns, you are patch the state accordingly. Have a separate service that handle the calls. Check this SO answer for more details https://stackoverflow.com/questions/54557628/where-to-make-api-call-and-how-to-structure-actions

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mahmudabir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants