Skip to content

Commit

Permalink
📝 (react-navigation) add react-navigation interoperability guide
Browse files Browse the repository at this point in the history
  • Loading branch information
tpucci committed Jul 29, 2019
1 parent 6469e2b commit 038d75c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions docs/guides/ReactNavigationInteroperability.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: React Navigation Interoperability
menu: Guides
route: /guides/react-navigation
---

# Can React Gondola work with React Navigation ❤️ ?

Yes it can.

## Good use of both of us 👍

1. The user is free to navigate on some top level pages (use `react-navigation`).
2. The user is forced to move forward/backward when he completes come steps in low level tunnels (use `react-gondola`).

This means that at a certain point in your navigation, you need to control the visibility of your page. That great power comes with great responsability.
✅ Test your state machine !

## How well it works ?

**Disclaimer:** interoperability has not been entirely tested. If you encounter any issue, feel free to open an issue on the `react-gondola` repo.

## Steps

1. Include one `Canal` inside a `react-navigation` page.
2. Disable `gesture` on that `react-navigation` page.
3. Disable `onBack` setting `<AndroidBackHandler onBackPress={() => {if (youWantToGoBackInReactNavigation()) {return false}; return true} />` in your `react-navigation` page (use `https://github.com/vonovak/react-navigation-backhandler`).
2 changes: 1 addition & 1 deletion doczrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
menu: [
'Welcome',
'Getting Started',
{ name: 'Guides', menu: ['Back', 'Transitions'] },
{ name: 'Guides', menu: ['Back', 'Transitions', 'React Navigation Interoperability'] },
'Example',
'Contribute',
'Roadmap',
Expand Down

0 comments on commit 038d75c

Please sign in to comment.