Answer the question
In order to leave comments, you need to log in
How to create temporary variables in Redux?
Hello. Prompt how to be in such situation:
1. Action - REQUEST_LOGIN is sent, there is an authorization request to the server.
2. A response with an error arrives, the error text is written to the store using a reducer.
3. When refreshing the page, the error text remains, as it was saved in the store
. How can I redo steps 1 and 2 to avoid the third?
Answer the question
In order to leave comments, you need to log in
Create a reducer that will keep track of something like CLEAN_LOGIN_ERROR or a generic CLEAN_ERROR, depending on how you have organized a store for these errors, and just call an action that will activate this reducer where you need it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question