From cef294287babc506ea7d7d85c4a264eff4cecbab Mon Sep 17 00:00:00 2001 From: James Gillmore Date: Wed, 14 Jun 2017 12:46:40 -0700 Subject: [PATCH] fix($docs): react navigation --- .eslintignore | 1 - docs/react-native.md | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.eslintignore b/.eslintignore index 7c3a2f2a..f9c3e4bf 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,4 +2,3 @@ dist flow-typed node_modules docs -src/patchNavigationHelpers.js diff --git a/docs/react-native.md b/docs/react-native.md index d2a0ee66..15756697 100644 --- a/docs/react-native.md +++ b/docs/react-native.md @@ -72,6 +72,32 @@ BackHandler.addEventListener('hardwareBackPress', () => { ## First Class React Navigation Support! > This is a rough sneak peak of what's possible. I'm almost done and this is the crown jewel of this package, and what I'm using for all my work in the coming months (June 2017). What we have is functional, but expect the docs to be completely revamped. This is just off the top of the dome for fellow journeymen: +First off, this relies on a plugin so it's not included in web builds. + +**Installation:** + +``` +yarn add redux-first-router-navigation +``` + +The way it works is quite interesting so you may want to check out its code: +https://github.com/faceyspacey/redux-first-router-navigation + + +**Usage:** +```js +import { connectRoutes } from 'redux-first-router' +import reduxNavigation from 'redux-first-router-navigation' + +connectRoutes(history, routesMap, { + navigators: reduxNavigation({ + tabs: MyTabNavigator, + stack1: Stack1Navigator, + stack2: Stack2Navigator + }) +}) +``` + This perhaps is the crowning feature of **Redux First Router**, we have a lot to share about it. First off, all the above setup continues to be exactly how you setup your *React Navigation*-based app. However, if you've used or studied *React Navigation*,