React-router模式?

router基于history进行的二次封装去监听路由的变化

1、createHashHistory模式

  使用URL中的hash(#)部分去创建,如http://example.com.cn/#/path。

2、createBrowserHistory模式

  使用浏览器中History的api处理URL,创建一个http://example.com.cn/path类似真实的url。

 

posted @ 2020-06-11 17:42  程序員劝退师  阅读(455)  评论(0)    收藏  举报