/react-router-v4

version 4 of react-router-dom

Primary LanguageJavaScriptMIT LicenseMIT

how to use react-router-dom

提供 11 个示例快速使用最新版本(V4)react-router.

说明

React Router 已经到 Version 4 的 Beta 版本,新的版本有了很大的改变,提供了 react-router-dom 和 react-router-native 两个包单独使用,并且新增了很多功能丰富的路由组件,写法也更加丰富和灵活了,这也正是所倡导的可组装性声明式两大特点的表现。以下是 Repo 中所提供的一些实例代码。

import BasicExample from './components/BasicExample'
import ParamsExample from './components/ParamsExample'
import AuthExample from './components/AuthExample'
import CustomLinkExample from './components/CustomLinkExample'
import PreventingTransitionsExample from './components/PreventingTransitionsExample'
import NoMatchExample from './components/NoMatchExample'
import RecursiveExample from './components/RecursiveExample'
import SidebarExample from './components/SidebarExample'
import AnimationExample from './components/AnimationExample'
import AmbiguousExample from './components/AmbiguousExample'
import RouteConfigExample from './components/RouteConfigExample'