Skip to content

Bardiamist/react-navigation-extension

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Getting started

  1. Install package:
yarn add react-navigation-extension
  1. Set navigator
import { setNavigatior } from 'react-navigation-extension';

<Navigator ref={(ref) => { setNavigatior('MAIN_NAVIGATOR', ref); }} />
  1. Make navigation
export const mainNavigation = makeNavigation('MAIN_NAVIGATOR');
  1. Navigate simple
import { mainNavigation } from 'react-navigation-extension';

mainNavigation.navigate('SIGN_UP');
mainNavigation.reset('SIGN_IN', 'FORGOT_PASSWORD', { email: '[email protected]' });

Available methods

export const makeNavigation = (navigationRouteName: string) => ({
  navigate: (routeName: string, params?: Object): boolean => {},
  setParams: (params: NavigationParams): boolean => {},
  goBack: () => {},
  reset: (routeName?: string | string[], params?: Object) => {},
  getCanNavigateBack: () => {},
});

About

Navigation with using refs on navigators

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%