diff --git a/versioned_docs/version-6.x/header-buttons.md b/versioned_docs/version-6.x/header-buttons.md index 833b94d429f..5894ff0f686 100755 --- a/versioned_docs/version-6.x/header-buttons.md +++ b/versioned_docs/version-6.x/header-buttons.md @@ -67,7 +67,7 @@ function StackScreen() { function HomeScreen({ navigation }) { const [count, setCount] = React.useState(0); - React.useEffect(() => { + React.useLayoutEffect(() => { // Use `setOptions` to update the button that we previously specified // Now the button includes an `onPress` handler to update the count navigation.setOptions({