Answer the question
In order to leave comments, you need to log in
How to refactor React conditional rendering with lots of ifs?
Hello!
There is a small React application (step by step form). Steps lie on different urls. And for recovery after a reboot, as well as for processing additional logic (for example, redirecting the user to the desired step if he did not upload the document), a fairly large number of conditions were written, including nested ones. For obvious reasons, this does not look very personal. How can you more conveniently rewrite all this "good"? Maybe someone came across. What if all this logic is moved to react-router-redux or redux-saga-router ?
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question