I try to use onLayouton mine WebView, but it does not start.
export default class Sandbox extends Component {
render() {
return (
<View style={styles.fill}>
<WebView
onLayout={(event) => {
console.log(event.nativeEvent.layout)
}}
source={{uri: 'https://github.com/facebook/react-native'}}
/>
</View>
)
}
}
const styles = StyleSheet.create({
fill: {
flex: 1,
},
})
Does anyone have an idea why this is not working? I checked the documentation and seemed to be available for use.
source
share