Skip to content

Commit

Permalink
docs: added usage example with gesture handler
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhom committed Jun 23, 2022
1 parent d74fd20 commit 098ccdf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,21 @@ const BasicScreen = () => {
);
};
```
### React Native Gesture Handler

To avoid issues when using the React Native Portal with React Native Gesture Handler, you must place the `PortalProvider` under the `GestureHandlerRootView`, otherwise it might freeze your app.

```tsx
export const App = () => (
<GestureHandlerRootView>
<PortalProvider>
{... your app goes here}
</PortalProvider>
</GestureHandlerRootView>
);
```

> Read more about the [app freezing issue](https://github.com/gorhom/react-native-portal/issues/24).
## Props

Expand Down Expand Up @@ -227,5 +242,10 @@ To keep this library maintained and up-to-date please consider [sponsoring it on
---

<p align="center">
<a href="https://gorhom.dev" target="_blank"><img height="18" alt="Mo Gorhom" src="./mogorhom.png"></a>
<a href="https://gorhom.dev/#gh-light-mode-only" target="_blank">
<img height="18" alt="Mo Gorhom" src="./mogorhom-light.png">
</a>
<a href="https://gorhom.dev/#gh-dark-mode-only" target="_blank">
<img height="18" alt="Mo Gorhom" src="./mogorhom-dark.png">
</a>
</p>
Binary file added mogorhom-dark.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes

0 comments on commit 098ccdf

Please sign in to comment.