mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-22 14:21:44 +00:00
[add] initial 'onLayout' support
Add initial support for 'onLayout' when components mount and update. Ref #60
This commit is contained in:
@@ -33,6 +33,7 @@ export default class App extends React.Component {
|
||||
|
||||
<Heading size='large'>Image</Heading>
|
||||
<Image
|
||||
onLayout={(e) => { console.log(e.nativeEvent.layout) }}
|
||||
accessibilityLabel='accessible image'
|
||||
children={<Text>Inner content</Text>}
|
||||
defaultSource={{
|
||||
@@ -57,6 +58,7 @@ export default class App extends React.Component {
|
||||
<Heading size='large'>Text</Heading>
|
||||
<Text
|
||||
onPress={(e) => { console.log('Text.onPress', e) }}
|
||||
onLayout={(e) => { console.log(e.nativeEvent.layout) }}
|
||||
testID={'Example.text'}
|
||||
>
|
||||
PRESS ME.
|
||||
|
||||
Reference in New Issue
Block a user