Add onPress

This commit is contained in:
Andrew Shini 2017-05-13 11:15:33 +10:00 committed by GitHub
parent 52461fdb6f
commit 7067d0417f
1 changed files with 1 additions and 0 deletions

View File

@ -21,6 +21,7 @@ export default class App extends Component {
height: this.props.height || 400,
}}
source={require('./tpl.html')}
onMessage={event => this.props.onPress ? this.props.onPress(JSON.parse(event.nativeEvent.data)) : null}
/>
</View>
);