How to use the react-navigation.addNavigationHelpers function in react-navigation

To help you get started, we’ve selected a few react-navigation examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github react-navigation / react-navigation / website / src / Server.js View on Github external
function AppHandler(req, res) {
  let status = 200;
  const path = req.url.substr(1);
  let initAction = App.router.getActionForPathAndParams(path);
  if (!initAction) {
    initAction = NavigationActions.navigate({
      routeName: 'NotFound',
      params: { path },
    });
    status = 404;
  }
  const topNavigation = addNavigationHelpers({
    state: App.router.getStateForAction(initAction),
    dispatch: action => false,
  });
  const screenNavigation = addNavigationHelpers({
    state: topNavigation.state.routes[topNavigation.state.index],
    dispatch: topNavigation.dispatch,
  });

  const Component = App.router.getComponentForState(topNavigation.state);
  const { title } = App.router.getScreenOptions(screenNavigation, {});
  const app = ;
  const body = ReactDOMServer.renderToString(app);
  let html = indexHtml;
  html = html
    .split('<div id="root"></div>')
    .join(`<div id="root">${body}</div>`);
github EQuimper / youtubeMeetupAppReactNativeNode / meetupme-mobile / src / routes / AppNavigator.js View on Github external
render() {
    const navigation = addNavigationHelpers({
      dispatch: this.props.dispatch,
      state: this.props.navigation,
    });

    if (this.props.user.isLogged) {
      return ;
    }

    return ;
  }
}
github mutualmobile / Brazos / src / utils / createNavigationWrapper.js View on Github external
render() {
      const { nav } = this.props;
      const navigationHelper = addNavigationHelpers({
        dispatch: nav.dispatchNavigation,
        state: nav.navigationState,
      });
      return ;
    }
  }
github ali322 / CNodeRN / app / index.js View on Github external
render() {
        return  { this.navigator = nav; }} navigation={addNavigationHelpers({
            dispatch:this.props.dispatch,
            state:this.props.nav
        })} screenProps={this.props.root}/&gt;
    }
}
github kyaroru / ReactNavTab / src / components / navigator / root / index.js View on Github external
render() {
    const { dispatch, navigationState } = this.props;
    return (
      
    );
  }
}
github parkerdan / SampleNavigation / app / tabOne / views / TabOneNavigation.js View on Github external
render(){
    const { navigationState, dispatch } = this.props
    return (
      
    )
  }
}
github EQuimper / twitter-clone-with-graphql-reactnative / mobile / src / navigations.js View on Github external
render() {
    const nav = addNavigationHelpers({
      dispatch: this.props.dispatch,
      state: this.props.nav,
    });
    if (!this.props.user.isAuthenticated) {
      return ;
    }
    return ;
  }
}
github 1280103995 / react-native-elm / src / navigation / AppWithNavigationState.js View on Github external
render() {
    const { dispatch, nav } = this.props;
    const navigation = addNavigationHelpers({
      dispatch,
      state: nav,
      addListener,
    });
    return (
      
    );
  }
}