-
I just recently followed the React Router v6 tutorial. I implemented the code into my project (live demo, GitHub) but found something interesting. Is it possible to setup App.js to include a message like:
but this message disappears when one of the nav bar links is pressed? Currently, the message will appear above other content when one of the navigation links is pressed. It makes sense that
Thank you for reading! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I found an answer myself using this StackOverflow post: https://stackoverflow.com/a/72267552/17386696 I created a route to a new component using
|
Beta Was this translation helpful? Give feedback.
I found an answer myself using this StackOverflow post: https://stackoverflow.com/a/72267552/17386696
I created a route to a new component using
index
, seen here: https://reactrouter.com/docs/en/v6/getting-started/concepts#defining-routes<Route index element={<LandingPage />} />