wrong javascript in example

This commit is contained in:
Christopher Glantschnig 2015-03-30 17:04:20 +02:00
parent f3cd27cf48
commit 5f9c16a705
1 changed files with 8 additions and 8 deletions

View File

@ -145,15 +145,15 @@ 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() {
getInitialState() {
return { text: 'Goodbye World.' };
},
componentDidMount() {
NativeModules.MyCustomModule.processString(this.state.text, (text) => {
this.setState({text});
});
},
return (
<Text>{this.state.text}</Text>
);