How to use the react-native-navigation.Navigation.startSingleScreenApp 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 xgfe / react-native-ui-xg / index.ios.js View on Github external
import {Navigation} from 'react-native-navigation';

import registerScreens from './example/registerScreens';

registerScreens(); // this is where you register all of your app's screens

// start the app
Navigation.startSingleScreenApp({
  screen: {
    screen: 'Home', // unique ID registered with Navigation.registerScreen
    title: 'Welcome', // title of the screen as appears in the nav bar (optional)
    navigatorStyle: {
      navBarBackgroundColor: '#f7f7f8'
    }, // override the navigator style for the screen, see "Styling the navigator" below (optional)
    navigatorButtons: {} // override the nav buttons for the screen, see "Adding buttons to the navigator" below (optional)
  },
  animationType: 'none'
});
github proshoumma / Book-of-Spices / src / App.js View on Github external
import { Navigation } from 'react-native-navigation'

import registerScreens from './registerScreens'
import routes from './routes'
import { routeNames } from './constants'

// register all the screens
registerScreens(Navigation.registerComponent, routes)

// start the app
Navigation.startSingleScreenApp({
  screen: {
    screen: routeNames.LANDING
  },
  appStyle: {
    keepStyleAcrossPush: false
  }
})

export default Navigation
github iotaledger / trinity-wallet / src / mobile / containers / settings.js View on Github external
onLogoutPress() {
        {
            /* this.props.logoutFromWallet() */
        }
        this.props.clearTempData();
        this.props.setPassword('');
        Navigation.startSingleScreenApp({
            screen: {
                screen: 'login',
                navigatorStyle: {
                    navBarHidden: true,
                    screenBackgroundImageName: 'bg-green.png',
                    screenBackgroundColor: '#102e36',
                },
            },
        });
    }
github pashkoostap / react-native-practical-guide / App.js View on Github external
// Screens
import AuthScreen from "./src/screens/Auth/Auth";
import SharePlace from "./src/screens/SharePlace/SharePlace";
import FindPlace from "./src/screens/FindPlace/FindPlace";
import PlaceDetail from "./src/screens/PlaceDetail/PlaceDetail";
import SideDrawer from "./src/screens/SideDrawer/SideDrawer";

// Register screens
Navigation.registerComponent("AuthScreen", () => AuthScreen, store, Provider);
Navigation.registerComponent("SharePlace", () => SharePlace, store, Provider);
Navigation.registerComponent("FindPlace", () => FindPlace, store, Provider);
Navigation.registerComponent("PlaceDetail", () => PlaceDetail, store, Provider);
Navigation.registerComponent("SideDrawer", () => SideDrawer, store, Provider);

// Start an App
Navigation.startSingleScreenApp({
  screen: {
    screen: "AuthScreen",
    title: "Login",
    navigatorStyle: { navBarHidden: true }
  }
});
github staltz / manyverse / src / drivers / navigation.ts View on Github external
const screenVNodeMimic$ = xs.create();
  const commandMimic$ = xs.create();
  const latestVNodes = new Map>();
  for (let i = 0, n = screenIDs.length; i < n; i++) {
    const screenID = screenIDs[i];
    Navigation.registerComponent(
      screenID,
      makeScreenComponent(
        screenID,
        latestVNodes,
        screenVNodeMimic$,
        commandMimic$
      )
    );
  }
  Navigation.startSingleScreenApp(config);

  function screenVNodeDriver(screenVNode$: Stream) {
    screenVNode$.addListener({
      next: s => {
        latestVNodes.set(s.screen, s.vdom);
      }
    });
    screenVNode$._add(screenVNodeMimic$);
    return new ScreensSource();
  }
  function commandDriver(command$: Stream) {
    command$._add(commandMimic$);
  }
  return {screenVNodeDriver, commandDriver};
}
github Bit-Nation / BITNATION-Pangea-mobile / src / modules / navigation / navigation-sagas / sagas.js View on Github external
export function launchLoggedOutFlow(hasAccounts: boolean) {
  Navigation.startSingleScreenApp({
    screen:
      hasAccounts === true
        ? screen('ACCOUNTS_ACCESS_SCREEN')
        : screen('ACCOUNTS_ACCESS_SCREEN'),
    appStyle: { ...appStyle },
  });
}
github birkir / kvikmyndr-app / src / index.js View on Github external
store.setup().then(() => {

  if (Platform.OS === 'android') {
    Navigation.startSingleScreenApp({
      screen: Presets.get(IN_THEATERS_SCREEN),
      drawer: { left: { screen: DRAWER_SCREEN } },
      animationType: 'fade',
    });
  }

  if (Platform.OS === 'ios') {
    const navigatorStyle = {
      navBarButtonColor: '#FFF',
      navBarTextColor: '#FFF',
      navBarHideOnScroll: false,
      navBarTranslucent: true,
      navBarNoBorder: true,

      topTabTextColor: '#FFF',
      selectedTopTabIndicatorColor: '#FF2244',
github iotaledger / trinity-wallet / src / mobile / containers / fingerprintDisable.js View on Github external
goBack() {
        Navigation.startSingleScreenApp({
            screen: {
                screen: 'home',
                navigatorStyle: {
                    navBarHidden: true,
                    navBarTransparent: true,
                    screenBackgroundColor: THEMES.getHSL(this.props.backgroundColor),
                },
            },
            appStyle: {
                orientation: 'portrait',
            },
        });
    }
github brandingbrand / flagship / packages / fsapp / src / fsapp / FSApp.tsx View on Github external
startApp(): void {
    if (this.appConfig.appType === 'singleScreen' && this.appConfig.screen) {
      Navigation.startSingleScreenApp({
        screen: this.appConfig.screen,
        drawer: this.appConfig.drawer,
        animationType: 'fade'
      });
    } else if (this.appConfig.tabs && this.appConfig.tabs.length) {
      Navigation.startTabBasedApp({
        tabs: this.appConfig.tabs,
        tabsStyle: this.appConfig.tabsStyle,
        appStyle: this.appConfig.appStyle,
        drawer: this.appConfig.drawer,
        animationType: 'fade'
      });
    } else {
      throw new Error('invalide settings for screens and appType in appConfig');
    }
  }