Skip to main content
Version: 1.0.58

Screen Life Cycle Events

Understanding screen onStart and onEnd

Whenever a screen is mounted and unmounted, there are two methods gets called for each screen.

onStart:

This method is called whenever screen is mounted.

const screen = {
name: 'WelcomeScreen',
screen: {
v1: [text, ...],
},
onStart:({route, navigation, uiElements})=>{
// do something on screen mounted
return uiElements;
}
};

onEnd:

This method is called whenever screen is unmounted

const screen = {
name: 'WelcomeScreen',
screen: {
v1: [text, ...],
},
onEnd:({route, navigation, uiElements})=>{
// do something on screen unmounted
return uiElements;
}
};