How to use the react-native-navigation.Navigation.push function in react-native-navigation

To help you get started, we’ve selected a few react-native-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 RN-ONE / RNFrameWorkNew / app / util / NavigationUtil.js View on Github external
static push(currentComponentId, newComponentName, title, param) {
        Navigation.push(currentComponentId, this.getRNNComponent(newComponentName, title, param))
            .then((result) => {
                console.log({result});
            }).catch((error) => {
            console.log({error});
        });
    }
github wix / react-native-navigation / playground / src / screens / PushedScreen.js View on Github external
onClickPushWaitForRender = async () => {
    await Navigation.push(this.props.componentId, {
      component: {
        name: 'navigation.playground.PushedScreen',
        passProps: {
          stackPosition: this.getStackPosition() + 1,
          previousScreenIds: _.concat([], this.props.previousScreenIds || [], this.props.componentId),
          simulateLongRunningTask: true
        },
        options: {
          layout: {
            backgroundColor: 'transparent'
          },
          topBar: {
            title: {
              text: `Pushed ${this.getStackPosition() + 1}`
            }
          },
github zzorba / ArkhamCards / components / campaign / CampaignDetailView / index.tsx View on Github external
_oddsCalculatorPressed = () => {
    const {
      componentId,
      campaign,
      allInvestigators,
    } = this.props;
    this.setState({
      menuOpen: false,
    });
    if (campaign) {
      Navigation.push(componentId, {
        component: {
          name: 'OddsCalculator',
          passProps: {
            campaign,
            allInvestigators,
          },
        },
      });
    }
  };
github birkir / hekla / src / screens / settings / Settings.tsx View on Github external
onThemePress() {
    Navigation.push(UI.componentId, {
      component: {
        name: SETTINGS_THEME_SCREEN,
      },
    });
  }
github raindropio / mobile / src / modules / navigation / index.js View on Github external
push({ componentId }, screenName, passProps, options) {
        return Navigation.push(componentId, uber.getComponent(screenName, passProps, options))
    },
github birkir / hekla / src / screens / search / Search.tsx View on Github external
onSearchCommentsPress() {
    Navigation.push(this.props.componentId, {
      component: {
        name: RESULT_SCREEN,
        passProps: {
          type: 'comments',
          query: this.query,
        },
      },
    });
  }
github hummingbird-me / kitsu-mobile / src / screens / Profiles / MediaPages / pages / Summary / component.js View on Github external
  navigateToMedia = (mediaType, mediaId) => Navigation.push(this.props.componentId, {
    component: {
      name: Screens.MEDIA_PAGE,
      passProps: { mediaId, mediaType },
    },
  });
github hummingbird-me / kitsu-mobile / src / screens / Feed / components / MediaTag / component.js View on Github external
const navigateToMedia = (media, componentId) => {
  if (media) {
    Navigation.push(componentId, {
      component: {
        name: Screens.MEDIA_PAGE,
        passProps: { mediaId: media.id, mediaType: media.type },
      },
    });
  }
};
github forest-watcher / forest-watcher / app / components / settings / index.js View on Github external
UNSAFE_componentWillReceiveProps(props: Props) {
    if (props.areas.length === 0 && props.loggedIn) {
      Navigation.push(this.props.componentId, {
        component: {
          name: 'ForestWatcher.SetupCountry'
        }
      });
    }
  }
github zzorba / ArkhamCards / components / campaign / MyDecksSelectorDialog.tsx View on Github external
showNewDeckDialog() {
    const {
      componentId,
      onDeckSelect,
    } = this.props;
    Navigation.push(componentId, {
      component: {
        name: 'Deck.New',
        passProps: {
          onCreateDeck: onDeckSelect,
          filterInvestigators: this.filterInvestigators(),
        },
      },
    });
  }