How to use the @react-navigation/native.createAppContainer function in @react-navigation/native

To help you get started, we’ve selected a few @react-navigation/native 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 / experimental-transitioner / example / App.js View on Github external
);

const EXAMPLES = {
  Fade,
  Modal,
  Gesture,
  CardStack,
  SharedEl,
};

const AppNavigator = createSwitchNavigator({
  Examples,
  ...EXAMPLES,
});

const StatefulAppNavigator = createAppContainer(AppNavigator);

// const StatefulAppNavigator = createAppContainer(Fade);
// const StatefulAppNavigator = createAppContainer(Modal);
// const StatefulAppNavigator = createAppContainer(Gesture);
// const StatefulAppNavigator = createAppContainer(CardStack);
// const StatefulAppNavigator = createAppContainer(SharedEl);

const App = () => (
  
    
  
);

Expo.registerRootComponent(App);
github keybase / client / shared / router-v2 / router.native.tsx View on Github external
style={{backgroundColor: Styles.globalColors.white}}
  >
    
  
)

const RootStackNavigator = createSwitchNavigator(
  {
    loading: {screen: SimpleLoading},
    loggedIn: LoggedInStackNavigator,
    loggedOut: LoggedOutStackNavigator,
  },
  {initialRouteName: 'loading'}
)

const AppContainer = createAppContainer(RootStackNavigator)

class RNApp extends React.PureComponent {
  private nav: any = null

  // TODO remove this eventually, just so we can handle the old style actions
  dispatchOldAction = (old: any) => {
    const nav = this.nav
    if (!nav) {
      throw new Error('Missing nav?')
    }

    const actions = Shared.oldActionToNewActions(old, nav._navigation) || []
    try {
      actions.forEach(a => nav.dispatch(a))
    } catch (e) {
      logger.error('Nav error', e)
github keybase / client / shared / router-v2 / router.native.tsx View on Github external
style={{backgroundColor: Styles.globalColors.white}}
  >
    
  
)

const RootStackNavigator = createSwitchNavigator(
  {
    loading: {screen: SimpleLoading},
    loggedIn: LoggedInStackNavigator,
    loggedOut: LoggedOutStackNavigator,
  },
  {initialRouteName: 'loading'}
)

const AppContainer = createAppContainer(RootStackNavigator)

class RNApp extends React.PureComponent {
  private nav: any = null

  // TODO remove this eventually, just so we can handle the old style actions
  dispatchOldAction = (old: any) => {
    const nav = this.nav
    if (!nav) {
      throw new Error('Missing nav?')
    }

    const actions = Shared.oldActionToNewActions(old, nav._navigation) || []
    try {
      actions.forEach(a => nav.dispatch(a))
    } catch (e) {
      logger.error('Nav error', e)
github expo / expo / home / navigation / Navigation.js View on Github external
const RootStack = createStackNavigator(
  {
    Tabs: TabNavigator,
    SignIn: SignInScreen,
    SignUp: SignUpScreen,
    QRCode: QRCodeScreen,
  },
  {
    initialRouteName: 'Tabs',
    mode: 'modal',
    defaultNavigationOptions,
  }
);

export default createAppContainer(RootStack);

function renderIcon(
  IconComponent: any,
  iconName: string,
  iconSize: number,
  isSelected: boolean,
  theme: 'light' | 'dark'
) {
  let color = isSelected ? Colors[theme].tabIconSelected : Colors[theme].tabIconDefault;

  return ;
}

const styles = StyleSheet.create({
  icon: {
    marginBottom: Platform.OS === 'ios' ? -3 : 0,
github IjzerenHein / react-native-shared-element / Example / src / screens / ReactNavigationScreen.js View on Github external
tabBarIcon: ({tintColor}) => (
        
      ),
      tabBarVisible: isTabBarVisible(navigation),
    }),
    transitionConfig: () => fadeIn(0, true),
  }
);

export const tabNavigator = createBottomTabNavigator({
  stack: stackNavigator,
  modal: modalNavigator,
  fade: fadeNavigator,
});

const AppContainer = createAppContainer(tabNavigator);

type PropsType = {};

export class ReactNavigationScreen extends React.Component {
  render() {
    return (
      
    );
  }
}
github expo / expo / apps / native-component-list / src / navigation / RootNavigation.ts View on Github external
import { createAppContainer } from '@react-navigation/native';

import MainTabNavigator from './MainTabNavigator';

export default createAppContainer(MainTabNavigator);
github react-navigation / native / example / App.js View on Github external
},
      };

      return acc;
    }, {}),
  },
  {
    mode: 'modal',
    headerMode: 'none',
    defaultNavigationOptions: {
      gesturesEnabled: false,
    },
  }
);

const App = createAppContainer(Root);
export default App;
registerRootComponent(App);
github react-navigation / core / example / App.js View on Github external
},
      };

      return acc;
    }, {}),
  },
  {
    mode: 'modal',
    headerMode: 'none',
    defaultNavigationOptions: {
      gesturesEnabled: false,
    },
  }
);

const Navigation = createAppContainer(Root);

const App = () => {
  let [theme, setTheme] = React.useState('light');

  return (