Using Wix's react-native-navigation, what's the difference between setting layout options using these methodologies?
Navigation.setDefaultOptions({
topBar: {
background: {
color: 'red'
}
}
});
vs.
static options(passProps) {
return {
topBar: {
background: {
color: 'red'
}
}
};
}
vs.
Navigation.events().registerAppLaunchedListener(() => {
Navigation.setRoot({
root: {
stack: {
children: [{}],
options: {
topBar: {
background: {
color: 'red'
}
}
}
}
}
});
});
What are some reasons/cases/etc to define options statically inside a component, versus initializing a root with options? And what are the functional differences/what happens behind the scenes with these different ways?