Last active
January 22, 2019 20:52
-
-
Save pictos/c97814a08b04acebf648d4e65be2aa73 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// JavaScript | |
var React = require('react-native'); | |
var { NativeModules, Text } = React; | |
var Message = React.createClass({ | |
getInitialState() { | |
return { text: 'Goodbye World.' }; | |
}, | |
componentDidMount() { | |
NativeModules.MyCustomModule.processString(this.state.text, (text) => { | |
this.setState({text}); | |
}); | |
}, | |
render: function() { | |
return ( | |
<Text>{this.state.text}</Text> | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment