简体   繁体   中英

Why are my nested route components not rendering in react-router-dom 6?

I have the following routes in my App.tsx file:

When I visit the /help URL, I can see that the document title and navbar have loaded in the DOM, however, I don't see any of my nested routes and I'm also not receiving any errors or warnings.

Your top level Routes is taking care of the /collections part of the URL, therefore the nested routes also having /collections would make me wonder if router is expecting your URL to be /collections/collections

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM