mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-26 23:06:03 +08:00
Fix typo in docs for getComponentForRouteName (#714)
This commit is contained in:
committed by
Eric Vicenti
parent
da5ec61027
commit
255a4361aa
@@ -51,7 +51,7 @@ Typically this should return a navigation state, with the following form:
|
||||
|
||||
If the router has handled the action externally, or wants to swallow it without changing the navigation state, this function will return `null`.
|
||||
|
||||
### `getComponentRouteName(routeName)`
|
||||
### `getComponentForRouteName(routeName)`
|
||||
|
||||
Returns the child component or navigator for the given route name.
|
||||
|
||||
@@ -66,7 +66,7 @@ Say a router `getStateForAction` outputs a state like this:
|
||||
}
|
||||
```
|
||||
|
||||
Based on the routeNames in the state, the router is responsible for returning valid components when calling `router.getComponentRouteName('Foo')` or `router.getComponentRouteName('Bar')`.
|
||||
Based on the routeNames in the state, the router is responsible for returning valid components when calling `router.getComponentForRouteName('Foo')` or `router.getComponentForRouteName('Bar')`.
|
||||
|
||||
### `getComponentForState(state)`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user