React v4以后,react-router 导出所有core组件和函数。react-router-dom导出了dom相关的组件,像Link(which renders an <a>
) 和 (which interacts with the browser's window.history
)。
react-router-dom导入了所有的react-router的导出,归根到底,业务中使用react-router-dom或者react-native 就行
参考链接
React v4以后,react-router 导出所有core组件和函数。react-router-dom导出了dom相关的组件,像Link(which renders an <a>
) 和 (which interacts with the browser's window.history
)。
react-router-dom导入了所有的react-router的导出,归根到底,业务中使用react-router-dom或者react-native 就行
参考链接