headerRight randomly position the component incorrectly
See original GitHub issueI was testing the createNativeStackNavigation
and ended up having this random issue where the component rendered by headerRight
is being positioned incorrectly sometimes. There’s nothing special in my code, I am just rendering a <Button>
from react-native
.
Here’s the source code: https://github.com/lnmunhoz/react-native-experiments/blob/master/react-navigation-examples/examples/NativeNavigation.tsx.
Update
The issue also happens when the headerLargeTitle
is false
.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:48 (19 by maintainers)
Top Results From Across the Web
Is there a good way to set headerRight to pass onPress event ...
First thing you cannot access navigation outside of the NavigationContainer so remove navigation from your App declaration :
Read more >react-navigation-header-buttons - npm
setOptions({ // in your app, extract the arrow function into a separate component // to avoid creating a new one every time headerRight: ......
Read more >Policy - Portland Public Schools
Random controlled substance testing shall be a minimum of 50 percent of the number of driver positions each selection period.
Read more >The Conjunctive and Disjunctive Events Bias - Farnam Street
This article is an introduction to Conjunctive and Disjunctive Events Bias that details how these two biases impact our decisions.
Read more >10 Emotion-Coaching Phrases to Use When Your Child is Upset
Or how for some reason falling down this time and in this place, ... A key part of being your child's emotion coach...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have a workaround if it’s a blocker for anyone here https://github.com/react-navigation/react-navigation/issues/6746#issuecomment-583897436:
It seems there’s been a bit of a regression here. I am seeing the header title being randomly positioned to the right when using NativeStack from react-navigation. Opening the view debugger in Xcode shows the width as 0, which would explain why it’s “to the right”, it’s centered with the width being 0 and shows the overflow.