Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anghelalexandra/53838aa9eca48cb82055707f23e99795 to your computer and use it in GitHub Desktop.
iOS and Android apps with React Native - React Native Navigation stack example
import { Navigation } from 'react-native-navigation';
import Login from './screens/Login';
import Dashboard from './screens/Dashboard';
import Settings from './screens/Settings';
import Posts from './screens/Posts';
import TopBar from './components/TopBar';
export default function registerScreens(store, Provider) {
Navigation.registerComponent('MyApp.Login', () => Login, store, Provider);
Navigation.registerComponent('MyApp.Dashboard', () => Dashboard, store, Provider);
Navigation.registerComponent('MyApp.Settings', () => Settings, store, Provider);
Navigation.registerComponent('MyApp.Posts', () => Posts, store, Provider);
Navigation.registerComponent('MyApp.TopBar', () => TopBar, store, Provider);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment