File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
versioned_docs/version-7.x Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -502,3 +502,16 @@ The `navigation` object has a `setOptions` method that lets you update the optio
502502 Update options
503503< / Button>
504504```
505+
506+ Futhermore, ` navigation.setOptions() ` can be used to set Custom header components for ` headerLeft ` , ` headerTitle ` and ` headerRight ` .
507+
508+ ``` js name="setOptions for navigation"
509+ useEffect (() => {
510+ // Setting custom header components
511+ navigation .setOptions ({
512+ headerLeft: < CustomHeaderLeftComponent {... props} / > , // Custom component on the left
513+ headerTitle: < CustomHeaderTitleComponent {... props} / > , // Custom title component
514+ headerRight: < CustomHeaderRightComponent {... props} / > , // Custom component on the right
515+ });
516+ }, [navigation, props]); // Adding 'props' as a dependency if required
517+ ```
You can’t perform that action at this time.
0 commit comments