Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit 6411599

Browse files
authored
Merge pull request #26 from liliang-cn/master
API的Router
2 parents 774bad7 + c64b53b commit 6411599

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages/react-router/docs/api/Router.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# <Router>
22

3-
The common low-level interface for all router components. Typically apps will use one of the high-level routers instead:
3+
Router是所有路由组件共用的底层接口,一般我们的应用并不会使用这个接口,而是使用高级的路由:
44

55
- [`<BrowserRouter>`](../../../react-router-dom/docs/api/BrowserRouter.md)
66
- [`<HashRouter>`](../../../react-router-dom/docs/api/HashRouter.md)
77
- [`<MemoryRouter>`](MemoryRouter.md)
88
- [`<NativeRouter>`](../../../react-router-native/docs/api/NativeRouter.md)
99
- [`<StaticRouter>`](StaticRouter.md)
1010

11-
The most common use-case for using the low-level `<Router>` is to
12-
synchronize a custom history with a state management lib like Redux or Mobx. Note that this is not required to use state management libs alongside React Router, it's only for deep integration.
11+
最常见的使用底层的`<Router>`的情形就是用来与Redux或者Mobx之类的状态管理库的定制的`history`保持同步。注意不是说使用状态管理库就必须使用`<Router>`,它仅用作于深度集成。
1312

1413
```js
1514
import { Router } from 'react-router'
@@ -24,7 +23,7 @@ const history = createBrowserHistory()
2423

2524
## history: object
2625

27-
A [`history`](https://github.com/ReactTraining/history) object to use for navigation.
26+
用来导航的[`history`](https://github.com/ReactTraining/history)对象.
2827

2928
```js
3029
import createBrowserHistory from 'history/createBrowserHistory'
@@ -35,7 +34,7 @@ const customHistory = createBrowserHistory()
3534

3635
## children: node
3736

38-
A [single child element](https://facebook.github.io/react/docs/react-api.html#react.children.only) to render.
37+
需要渲染的[单一组件](https://facebook.github.io/react/docs/react-api.html#react.children.only)
3938

4039
```js
4140
<Router>

0 commit comments

Comments
 (0)