How to use react-navigation-stack - 10 common examples

To help you get started, we’ve selected a few react-navigation-stack 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 EvanBacon / Instagram / navigation / MainTabNavigator.js View on Github external
navigationOptions.navigation.openDrawer();
        }}
      />
    ),
  }),
);
ProfileNav.path = '';
ProfileNav.navigationOptions = {
  tabBarIcon: createTabBarIcon('profile'),
};

function createTabBarIcon(name) {
  return ({ focused }) => ;
}

const Media = createStackNavigator(
  {
    MediaScreen,
    EditMedia,
  },
  {
    // initialRouteName: 'EditMedia',
  },
);
Media.path = '';
Media.navigationOptions = {
  tabBarIcon: createTabBarIcon('capture'),
};
const MainTabNavigator = createBottomTabNavigator(
  {
    Feed: FeedNav,
    // Explore: {
github LedgerHQ / ledger-live-mobile / src / families / tezos / DelegationFlow / index.js View on Github external
// @flow
import { Platform } from "react-native";
import { createStackNavigator } from "react-navigation-stack";
import { closableStackNavigatorConfig } from "../../../navigation/navigatorConfig";

import DelegationStarted from "./Started";
import DelegationSummary from "./Summary";
import DelegationSelectValidator from "./SelectValidator";
import DelegationConnectDevice from "./ConnectDevice";
import DelegationValidation from "./Validation";
import DelegationValidationSuccess from "./ValidationSuccess";
import DelegationValidationError from "./ValidationError";

const DelegationFlow = createStackNavigator(
  {
    // $FlowFixMe
    DelegationStarted,
    DelegationSummary,
    DelegationSelectValidator,
    DelegationConnectDevice,
    DelegationValidation,
    DelegationValidationSuccess,
    DelegationValidationError,
  },
  closableStackNavigatorConfig,
);

DelegationFlow.navigationOptions = ({ navigation }) => ({
  header: null,
  gesturesEnabled:
github RocketChat / Rocket.Chat.ReactNative / app / index.js View on Github external
RoomView: {
		getScreen: () => require('./views/RoomView').default
	},
	ThreadMessagesView: {
		getScreen: () => require('./views/ThreadMessagesView').default
	},
	MarkdownTableView: {
		getScreen: () => require('./views/MarkdownTableView').default
	},
	ReadReceiptsView: {
		getScreen: () => require('./views/ReadReceiptView').default
	}
};

// Inside
const ChatsStack = createStackNavigator({
	RoomsListView: {
		getScreen: () => require('./views/RoomsListView').default
	},
	RoomActionsView: {
		getScreen: () => require('./views/RoomActionsView').default
	},
	RoomInfoView: {
		getScreen: () => require('./views/RoomInfoView').default
	},
	RoomInfoEditView: {
		getScreen: () => require('./views/RoomInfoEditView').default
	},
	RoomMembersView: {
		getScreen: () => require('./views/RoomMembersView').default
	},
	SearchMessagesView: {
github expo / expo / apps / test-suite / AppNavigator.js View on Github external
import * as React from 'react';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { createStackNavigator } from 'react-navigation-stack';

import ModulesProvider from './ModulesProvider';
import SelectScreen from './screens/SelectScreen';
import TestScreen from './screens/TestScreen';

const AppNavigator = createStackNavigator(
  {
    Select: {
      screen: SelectScreen,
      path: '',
      navigationOptions: {
        title: 'Test Suite',
      },
    },
    TestScreen: {
      screen: TestScreen,
      path: 'TestScreen/:tests',
    },
  },
  {
    headerMode: 'screen',
    transitionConfig: global.DETOX
github rongcloud / rongcloud-react-native-imlib / example / index.js View on Github external
import { createAppContainer } from "react-navigation";
import { createStackNavigator } from "react-navigation-stack";
import { PermissionsAndroid } from "react-native";
import { init, connect } from "rongcloud-react-native-imlib";
import config from "./config";
import * as examples from "./examples";

PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE).catch(() => {});
PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.ACCESS_COARSE_LOCATION).catch(() => {});

init(config.appKey);
connect(config.token);

export default createAppContainer(createStackNavigator(examples, { initialRouteName: "default" }));
github BelinChung / react-native-hiapp / App / Navigator / index.js View on Github external
import ProfileScreen from '@Views/Profile'
import LanguageScreen from '@Views/Language'
import FeedbackScreen from '@Views/Feedback'
import MessageScreen from '@Views/Message'
import PostScreen from '@Views/Post'

import {
  View,
  Text,
  Platform
} from 'react-native'

const HomeStack = createStackNavigator({
  Home: { screen: HomeScreen, }
})
const ContactsStack = createStackNavigator({
  Contacts: { screen: ContactsScreen }
})
const SettingsStack = createStackNavigator({
  Settings: { screen: SettingsScreen },
})

const TabNavigator = createBottomTabNavigator(
  {
    Home: { screen: HomeStack },
    Contacts: { screen: ContactsStack },
    Settings: { screen: SettingsStack }
  },
  {
    defaultNavigationOptions: ({ navigation }) => ({
      tabBarLabel: ({ focused, tintColor }) => {
        const { routeName } = navigation.state
github react-navigation / react-navigation / example / src / Drawer.tsx View on Github external
InboxScreen.navigationOptions = {
  headerTitle: 'Inbox',
};

const EmailScreen = ({ navigation }: NavigationStackScreenProps) => (
  
);

const DraftsScreen = ({ navigation }: NavigationStackScreenProps) => (
  
);
DraftsScreen.navigationOptions = {
  headerTitle: 'Drafts',
};

const InboxStack = createStackNavigator(
  {
    Email: { screen: EmailScreen },
    Inbox: { screen: InboxScreen },
  },
  {
    navigationOptions: {
      drawerIcon: ({ tintColor }: { tintColor: string }) => (
        }
        />
      ),
      drawerLabel: 'Inbox',
    },
  }
github react-navigation / react-navigation / example / src / ModalStack.tsx View on Github external
navigation: NavigationScreenProp;
}) => (
  
);
MyProfileScreen.navigationOptions = ({
  navigation,
}: {
  navigation: NavigationScreenProp;
}) => ({
  title: `${navigation.state.params!.name}'s Profile!`,
});

const ProfileNavigator = createStackNavigator(
  {
    Home: {
      screen: MyHomeScreen,
    },
    Profile: {
      path: 'people/:name',
      screen: MyProfileScreen,
    },
  },
  {
    defaultNavigationOptions: {
      headerLeft: null,
    },
    mode: 'modal',
  }
);
github react-navigation / drawer / example / src / SimpleDrawer.tsx View on Github external
InboxScreen.navigationOptions = {
  headerTitle: 'Inbox',
};

const EmailScreen: NavigationStackScreenComponent = ({
  navigation,
}) => ;

const DraftsScreen: NavigationStackScreenComponent = ({
  navigation,
}) => ;
DraftsScreen.navigationOptions = {
  headerTitle: 'Drafts',
};

const InboxStack = createStackNavigator(
  {
    Inbox: { screen: InboxScreen },
    Email: { screen: EmailScreen },
  },
  {
    navigationOptions: ({ navigation }: NavigationDrawerScreenProps) => {
      const options: NavigationDrawerOptions = {
        drawerLabel: 'Inbox',
        drawerLockMode: (
          navigation.state.routes[navigation.state.index].params || {}
        ).drawerLockMode,
        drawerIcon: ({ tintColor }) => (
github react-navigation / drawer / example / src / ParallaxDrawer.tsx View on Github external
headerTitle: 'Inbox',
};

const EmailScreen: NavigationStackScreenComponent = ({
  navigation,
}) => ;

const DraftsScreen: NavigationStackScreenComponent = ({
  navigation,
}) => ;

DraftsScreen.navigationOptions = {
  headerTitle: 'Drafts',
};

const InboxStack = createStackNavigator(
  {
    Inbox: { screen: InboxScreen },
    Email: { screen: EmailScreen },
  },
  {
    navigationOptions: ({ navigation }) => {
      const options: NavigationDrawerOptions = {
        drawerLabel: 'Inbox',
        drawerLockMode: (
          navigation.state.routes[navigation.state.index].params || {}
        ).drawerLockMode,
        drawerIcon: ({ tintColor }) => (

react-navigation-stack

Stack navigator component for React Navigation

MIT
Latest version published 3 years ago

Package Health Score

56 / 100
Full package analysis

Popular react-navigation-stack functions