You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check line 24 (<WebView style={styles.webview} source={{uri: 'http://random.org'}}></WebView>).
Replace that line for: <View style={styles.webview}></View> and you will see that the View is working with Flex values.
If you add a width: 300 value in styles.webview (for the WebView component), you will see it will works.
hi guys , i fixed in my case, by package a father view , like: <View style={{flex:10}}> <WebView style={{flex:1}} /> </View> <View style={{flex:1}}> <WebView style={{flex:1}} /> </View>
Activity
mkonicek commentedon Nov 27, 2016
Here's a WebView stretched to fill its parent: https://rnplay.org/apps/z3g5qw
mkonicek commentedon Nov 27, 2016
Check out https://css-tricks.com/snippets/css/a-guide-to-flexbox/
kaykaul commentedon Mar 31, 2017
@mkonicek
I'm running react-native v 0.42.0 and am facing problems in laying out WebView with flex
In the above snippet, the WebView flex should cover more height as I have set

flex=10. But that's not the case.Comparing the above to working flex example:
daltonrenaldo commentedon Dec 6, 2017
I am having similar issues... it seems flex is always overridden to be
flex: 1on the webviewzfang6 commentedon Dec 21, 2017
Is this issue addressed?
LeeZC commentedon Mar 1, 2018
hi guys , i fixed in my case, by package a father view , like:
<View style={{flex:10}}><WebView style={{flex:1}} /></View><View style={{flex:1}}><WebView style={{flex:1}} /></View>