Skip to content

Commit e5ce006

Browse files
Update screen-options.md by detailing about navigation.setoptions()
1 parent db23292 commit e5ce006

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

versioned_docs/version-7.x/screen-options.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,3 +502,14 @@ The `navigation` object has a `setOptions` method that lets you update the optio
502502
Update options
503503
</Button>
504504
```
505+
Furthermore, to Set Navigation headers using `navigation.setOptions`, it majorly accepts `headerTitle`, `headerLeft` and `headerRight`
506+
```js
507+
useEffect(() => {
508+
// Adding custom header components
509+
navigation.setOptions({
510+
headerLeft: <CustomHeaderLeftComponent {...props} />,
511+
headerTitle: <CustomHeaderTitleComponent {...props} />,
512+
headerRight: <CustomHeaderRightComponent {...props} />,
513+
});
514+
}, []);
515+
```

0 commit comments

Comments
 (0)