React-router模式?
router基于history进行的二次封装去监听路由的变化
1、createHashHistory模式
使用URL中的hash(#)部分去创建,如http://example.com.cn/#/path。
2、createBrowserHistory模式
使用浏览器中History的api处理URL,创建一个http://example.com.cn/path类似真实的url。
router基于history进行的二次封装去监听路由的变化
1、createHashHistory模式
使用URL中的hash(#)部分去创建,如http://example.com.cn/#/path。
2、createBrowserHistory模式
使用浏览器中History的api处理URL,创建一个http://example.com.cn/path类似真实的url。