Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fcaldarelli/5cd71ccf32d59ed0567413175751103b to your computer and use it in GitHub Desktop.
Save fcaldarelli/5cd71ccf32d59ed0567413175751103b to your computer and use it in GitHub Desktop.
1. Inserire nel router il parametro che si andrà a modificare nel componente, esempio (in questo caso il parametro è title):
```
return makeHeader({
left: {
image: AppIcons.icons.arrow_back,
onPress: () => navigation.pop(),
text: navigation.state.params?.miotitolo ?? "Titolo di default",
},
right: null,
});
```
2. Inserire nel componente le chiamata this.props.navigation.setParams passando il parametro da modificare:
```
this.props.navigation.setParams({
miotitolo: "il titolo che voglio modificare"
});
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment