[英]Check react-routes in run-time
在react-router中,有没有一种方法可以在浏览器中检查(例如使用开发工具)在运行时最终在应用程序中注册了哪些活动路由?
After some research I arrive to the conclusion that react-router doesn't have a global registry of routes to start with. 经过一番研究,我得出的结论是,react-router并没有全局的路由注册表 。 Rather, the routes are matched in the
render
functions every time the cycle arrive at them. 而是,每当循环到达它们时,路线就在
render
函数中匹配。
Unfortunately, react-router doesn't yet support knowing all the matches that happened since the root component until the child one. 不幸的是,react-router尚不支持知道从根组件到子组件为止发生的所有匹配。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.