You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -79,4 +79,60 @@ Now, the header can interact with the screen route/state:
79
79
header-interaction
80
80
```
81
81
82
+
### Header interaction with screen component
83
+
84
+
Sometimes it is necessary for the header to access properties of the screen component such as functions or state.
85
+
86
+
Let's say we want to create an 'edit contact info' screen with a save button in the header. We want the save button to be replaced by an `ActivityIndicator` while saving.
**Note**: Since the `handleSave`-param is only set on component mount it is not immidiately available in the `navigationOptions`-function. Before `handleSave` is set we pass down an empty function to the `Button`-component in order to make it render immidiately and avoid flickering.
136
+
137
+
82
138
To see the rest of the header options, see the [navigation options document](/docs/navigators/navigation-options#Stack-Navigation-Options).
0 commit comments