mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-10 09:13:43 +08:00
Update withNavigation.md (#2988)
This commit is contained in:
@@ -14,4 +14,12 @@ const MyComponent = ({ to, navigation }) => (
|
||||
);
|
||||
|
||||
const MyComponentWithNavigation = withNavigation(MyComponent);
|
||||
|
||||
|
||||
// or use decorators:
|
||||
|
||||
@withNavigation
|
||||
export default class MainScreen extends Component {
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user