[RN 0.36.0] onLayout is returning 0 for view drawn in NavigationCardStack
See original GitHub issue0a9b6be (I’m guessing) has caused onLayout
to return 0 for views returned in renderScene
in a NavigationCardStack
.
return (
<View onLayout={e => console.log(e.nativeEvent.layout.height)}>
<View style={{height: 100}} />
</View>
)
This prints 0. In 0.35.0 it prints 100. Using onLayout
inside NavigationCardStack
is important for iOS style dynamically resizing settings popovers.
What’s happening here?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:14 (11 by maintainers)
Top Results From Across the Web
react native - onLayout is not triggered - Stack Overflow
I have a small problem with triggering rotation event in react-native. I receive the error that this.setState is undefined . When I use...
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
Fixed!!! I wrapped the
ScrollView
by aView
tag. Addingstyle={{flex: 1}}
to theView
tag solved the problem. 😄 😄Thanks!