Adds a back handler to intercept user back navigation.
The backHandler pool is a stack with bubbling propagation support.
All handlers are cleared during navigation using the navigate
method.
- API LEVEL
1
- Functionality added
Registers a listener to handle events when the Eitri app regains user focus in specific scenarios.
This event is triggered in the following cases:
nativeNavigation.open
. When eitri-app B is closed, eitri-app A is notified.EitriBottomTabView
, the newly focused tab is notified.This event is not triggered in these scenarios:
nativeNavigation.open
.Example:
Eitri.navigation.addOnResumeListener(() => {
console.log("Eitri app was resumed");
});
Compatibility Control
- API Level 6: Functionality introduced.
- API Level 14: Full compatibility with
EitriBottomTabView
.
Closes the current eitri-app
Example:
Eitri.navigation.close()
- API LEVEL
1
- Functionality added
Optional
options: CloseOptionsNavigates to another screen contained in the views folder
Examples:
Simple navigation to a View in the folder:
Eitri.navigation.navigate({path: '/AnotherView'})
Navigation passing a state object from one view to another:
Eitri.navigation.navigate({path: '/AnotherView', state: { name: 'Pedro Álvares Cabral' }})
Use replace = true to indicate that the view will be replaced by the next one:
Eitri.navigation.navigate({path: '/AnotherView', replace: true})
- API LEVEL
1
- Functionality added
Opens an eitri-app
Example:
Eitri.navigation.open({
slug: 'checkout',
initParams: {item: 'Refrigerator', id: 999987},
restorationContext: {screen: 'categories/appliances'}
})
- API LEVEL
1
- Functionality added
Registers a listener to handle events when the Eitri app regains user focus in specific scenarios.
It clears any other onResume listeners already registered in the app.
This event is triggered in the following cases:
nativeNavigation.open
. When eitri-app B is closed, eitri-app A is notified.EitriBottomTabView
, the newly focused tab is notified.This event is not triggered in these scenarios:
nativeNavigation.open
.Example:
Eitri.navigation.setOnResumeListener(() => {
console.log("Eitri app was resumed");
});
Compatibility Control
- API Level 6: Functionality introduced.
- API Level 14: Full compatibility with
EitriBottomTabView
.
Generated using TypeDoc
Set of methods for navigating between screens. Each set of files (jsx and js) in the view folder generates a screen. It is possible to navigate through these screens using the methods described here.