1.0.1 • Published 4 years ago
react-stack-navigation v1.0.1
REACT STACK NAVIGATION
Developer
@jovemdeveloper
Methods
- push( page , params) places the page in the navigation stack
pushClean( page , params ) inserts the page into the navigation stack and clears the navigation stack, leaving only the page to be inserted
replace( page , params) replaces the current page in the navigation stack
goBack( ) removes the current page from the navigation stack and returns to the previous one
How to use
import {StackNavigation} from "react-stack-navigation";
AppRegistry.registerComponent(appName, () => StackNavigation(
{
Page1:Page1,
Page2: Page2,
},{
initial: 'Page1'
}
));
Recommendation
start the application with a splash, as all pages will have only one instance, that is, the constructor of each page will be executed only once and it takes time for all pages to be created in memory