Replies: 1 comment 2 replies
-
<Routes>
<Route path='/routeX' element={<PageX />} />
...
<Routes> You do not need to unmount anything. When the route changes, the React components mounted by the current route will be automatically unmounted. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the single paragraph of documentation regarding the most important thing in this update, you mention Route has replaced Switch. I can't find anywhere how to unmount a component on route change.
Beta Was this translation helpful? Give feedback.
All reactions