Questions regarding Routes and useNavigationType #10053
Unanswered
vaibhavm02
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, we are in the process of upgrading our app to react-router-dom version 6 and there are certain issues that we are facing. I feel like I need more understanding around the concepts or the new changes introduced but the documentation falls a little short in details. So, I would like to understand a bit more about the following:
When we pass location as prop to
<Routes>
in react-router-dom v6 like<Routes location={location}>...</Routes>,
useNavigationType
always returns "POP" on any action inside the individual routes. I would like to understand if this is intentional and the reasoning behind the same.matchPath
in v6 works differently than in v5. Now, when passing""
as path it returnsnull
. In v5 on passing the same it returned the component matching/
route. What is the reason behind this change?Thank you!
Beta Was this translation helpful? Give feedback.
All reactions