Manager for react-native-navigation
- More flexible control your navigation.
- Navigation tree under hand.
- Get state in any time.
The package is distributed using npm, the node package manager.
npm i --save @lomray/react-native-navigation-manager
- Create instance of navigation manager:
import { NavigationManager } from '@lomray/react-native-navigation-manager'
const manager = new NavigationManager();
export default manager;
- Use navigation manager instead original navigation:
import NavigationManager from './navigation-manager';
// Run as soon as possible
NavigationManager.listen();
// Use manager instead base navigation
NavigationManager.push({
component: {
name: 'my-scfreen',
},
});
// Get latest component id in tree
console.log(NavigationManager.current.getComponentId());
console.log(NavigationManager.current.getStackId());
console.log(NavigationManager.current.getModalId());
console.log(NavigationManager.current.getOverlayId());
Bug or a feature request, please open a new issue.
Made with 💚
Published under MIT License.