Merge pull request #496 from Safari92/master
wrong javascript in example
This commit is contained in:
commit
032b3cd841
16
README.md
16
README.md
|
@ -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>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue