Skip to content

Instantly share code, notes, and snippets.

@jbpin
Last active August 13, 2016 11:59
Show Gist options
  • Save jbpin/433809c3af42f32801d4a04a60dc8cce to your computer and use it in GitHub Desktop.
Save jbpin/433809c3af42f32801d4a04a60dc8cce to your computer and use it in GitHub Desktop.
NavigationStore
import { Store, Command } from 'sinux';
import { NavigationExperimental } from 'react-native';
const {
StateUtils: NavigationStateUtils
} = NavigationExperimental
const navigationStore = new Store({ index: 0, routes: [] }, ...Object.keys(NavigationStateUtils));
for(method in NavigationStateUtils){
new Command(navigationStore[method], NavigationStateUtils[method]);
}
export default navigationStore;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment