Skip to content

Instantly share code, notes, and snippets.

@talkol
Created March 11, 2016 05:56
Show Gist options
  • Save talkol/d71f176bf49bfbf25d0e to your computer and use it in GitHub Desktop.
Save talkol/d71f176bf49bfbf25d0e to your computer and use it in GitHub Desktop.
'use strict';
var Controllers = require('react-native-controllers');
var React = Controllers.hijackReact();
var {
ControllerRegistry,
TabBarControllerIOS,
NavigationControllerIOS,
ViewControllerIOS,
DrawerControllerIOS
} = React;
// require all top level react components you refer to in the layout
require('./FavoritesScreen');
var MoviesApp = Controllers.createClass({
render: function() {
return (
<NavigationControllerIOS
title="Favorites"
component="FavoritesScreen"
id="favorites"
passProps={{hidePop: true}}
/>
);
},
});
ControllerRegistry.registerController('MoviesApp', () => MoviesApp);
// this line makes the app actually start and initialize
ControllerRegistry.setRootController('MoviesApp');
module.exports = MoviesApp;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment