react学习之路01

从现在开始记录学习过程,监督和督促自己不断学习,

构建react项目;npx create-react-app 项目名

搭建后台管理系统  antd

常用的路由有三种方式   React Router

1. browserHistory

import { browserHistory } from 'react-router'
render(
  <Router history={browserHistory} routes={routes} />,
  document.getElementById('app')
)

 

路径:/path/path

2.hashHistory

路径:/path/#/path

不需要服务器配置

3.createMemoryHistory

 

const history = createMemoryHistory(location)

文档地址:http://react-guide.github.io/react-router-cn/docs/guides/basics/Histories.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章