reactjs – React Routes Question about routes with same path and components
Im new and experimenting with react and react routes.
My question is this:
In my React code i have these 2 files in App.js and Users.js. By using Routes just for fun and experimenting to render some random text, I have 3 routes that have the same path and components but shouldn’t the app have render it 3 times ?
why is it that when i start my App my user text only has user text only once ? Should it not render the text 3 times ?
Also what is the diff between and is there a advantage over the other cause i tried both and both render the same text , what the diff ?
Im using React-routing-dom v7 and react v18
In my App.js i Have this code
In my Users code i Have this
Read more here: Source link


