react 和 router的相关内容涉及react-router, react-router-dom, react-router-native。她们之间的关系引用react-router主页的一段介绍:
This package provides the core routing functionality for React Router, but you might not want to install it directly. If you are writing an application that will run in the browser, you should instead installreact-router-dom
. Similarly, if you are writing a React Native application, you should instead installreact-router-native
. Both of those will installreact-router
as a dependency.
具体一些区别和用法可以看下面的文档
React Router: Declarative Routing for Reactreacttraining.com一个词穷的妹子写文章结果就成了一堆思维导图(Emmm.....不足之处欢迎留言讨论)
发现一大批同学只收藏不点赞,哭哭~~~