Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

Commit

Permalink
docs: add info about integration with react-native-navigation on andr…
Browse files Browse the repository at this point in the history
…oid (#817)
  • Loading branch information
davidnum authored and satya164 committed Jun 23, 2019
1 parent 9e1346d commit 3cfa23a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,23 @@ The `lazy` option is disabled by default to provide a smoother tab switching exp

On Android, enabling `removeClippedSubviews` can improve memory usage. This option can also affect rendering performance negatively, so it is disabled by default. So make sure to test it when enabling it. Refer the [prop reference](#removeclippedsubviews) for more details.

### Usage with Wix [`react-native-navigation`](https://github.com/wix/react-native-navigation) on Android

On Android, you should wrap all your screens that uses `react-native-tab-view` with `gestureHandlerRootHOC` from [`react-native-gesture-handler`](https://github.com/kmagiera/react-native-gesture-handler).

For example:

Your root file, where you register screens, ex. `index.js`:

```
import { Navigation } from 'react-native-navigation';
import { gestureHandlerRootHOC } from 'react-native-gesture-handler';
Navigation.registerComponent('MyScreen', () => gestureHandlerRootHOC(MyScreen));
```

Now inside `MyScreen.js` we can use `react-native-tab-view`.

## Contributing

While developing, you can run the [example app](/example/README.md) to test your changes.
Expand Down

0 comments on commit 3cfa23a

Please sign in to comment.