首页 > 其他 > 详细

[React] React Router: hashHistory vs browserHistory

时间:2016-03-28 07:03:08      阅读:259      评论:0      收藏:0      [点我收藏+]

In this lesson we‘ll look at hashHistory which uses a hash hack to track our route changes vs browserHistory which delivers clean urls, but requires server work to implement.

 

Using hashHistory:

<Router history={hashHistory}>

http://localhost:3333/#/contact?_k=0lz6yy

 

Using browserHistory:

<Router history={browserHistory}>

We still need server everytime to return us index.html

http://localhost:3333/contact

 

[React] React Router: hashHistory vs browserHistory

原文:http://www.cnblogs.com/Answer1215/p/5327629.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!