I need to render some HTML code in my React Native app. But it seems like the WebView can't be set to auto height. Please help me with this problem. This is my code.
<View style={{
paddingLeft: 18,
paddingRight: 18,
paddingTop: 10,
paddingBottom: 10,
}}>
<WebView source={{
html: HTML
}}
javaScriptEnabled={true}
style={{
height: 200,
backgroundColor: colors.white,
marginTop: 20
}} />
</View>
As you can see here, I need to define a specific value to the height prop. How can I make its height dynamic, based on the inner HTML content height?