An open API service indexing awesome lists of open source software.

https://github.com/liupeijun/react-router-v4-maizuo

react+react-router-4.0版本 单页面应用实战
https://github.com/liupeijun/react-router-v4-maizuo

react react-router reactjs

Last synced: 16 days ago
JSON representation

react+react-router-4.0版本 单页面应用实战

Awesome Lists containing this project

README

        

# react-router-v4-maizuo

### React Router V4 正式版发布,该版本相较于前面三个版本有根本性变化,遵循 Just Component 的 API 设计理念。此项目是正是基于react router-v4.0的最佳实践

# 说明

>  这个项目是关于 react+react-router-4.0版本+ES6+webapck 单页面应用实战

>  webpack-dev-server的反向代理配置,解决前端跨域问题.

> 如果对您有帮助,您可以点右上角 "Star" 支持一下 谢谢! ^_^

> 或者您可以 "follow" 一下,我会继续开源项目

> 如有问题请在 Issues 中提,或者您发现问题并有非常好的解决方案,欢迎 PR 👍

# 项目运行(nodejs 6.0+)

``` bash
# 1. git clone [email protected]:liupeijun/react-router-v4-maizuo.git

# 2. 进入 目录, 安装依赖, 启动webpack dev server

cd react-router-v4-maizuo

cnpm install(******因为使用了sass,为了顺利完成安装,最好使用cnpm install******)

npm run dev  (开发环境)

```

# 效果演示





 

# 路由配置
``` bash
const router = (


{/*Renders the first child or that matches the location.*/}



{/*Renders the first child or that matches the location.*/}


{/*重定向*/}


}>









}>

{/*重定向*/}



)

```

# 待办事项

>  其他页面完善
>  引入redux管理状态

## License

[MIT](http://opensource.org/licenses/MIT)

Copyright (c) 2016-present, Kerwin Liu