B
B
beefront172020-01-08 15:55:22
JavaScript
beefront17, 2020-01-08 15:55:22

How to bind form to url, js?

Good afternoon! Need advice on the following situation.
Project on react/redux.
There is a form that should be attached to the URL, that is, when submitting, the get parameters in the URL should be changed and a request should be sent to the server, respectively, when the URL changes, a request should also be sent to the server and the corresponding data should be substituted in the form.
The question is, how is it more correct to first change the url, and then send a request to the server, or first send a request, check the repos, if successful - change the url?
And where is it better to change the url - in the component or somewhere in redux?
I will be grateful for your help!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question