Answer the question
In order to leave comments, you need to log in
How to correctly write Redirect in react-router-dom?
Hello. Please see the example code posted on CodeSandbox . When, for example, I go to the "Services" page and refresh the page, it takes me to the "Documents" page. I understand this because of: . He's supposed to redirect to /"documents" only when I go to "/" ? And he always when I update redirects there. <Redirect from="/" to="/documents" exact />
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