There is a lot of discussion about how to communicate with external services in Flux.
It's pretty clear that the main workflow is to run an HTTP request, which will ultimately send a successful or unsuccessful action based on the response. You can also send the message "in progress" before making a request.
But what if query parameters depend on the state of the repository? No one seems to mention this.
Thus, essentially, based on the user's interaction with the view, an ACTION is sent. The store has the logic of how to go from current state0 to the next state1 given by ACTION. The data from state 1 is necessary for the correct formation of a new HTTP request.
For example, the user selects a new filter on the page, and the repository also decides to reset pagination. This should result in a new HTTP request with (new filter value, first page), and not (new filter value, current page from state 0).
View cannot make the HTTP call itself correct using user interaction, because then it will have to duplicate the storage logic to go to the next state.
View cannot make an HTTP call in its onChange repository a handler, because at this stage it is already unknown what happened as a result of the state change.
, , firewall HTTP- . HTTP-, .
HTTP- Flux?