mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 17:45:59 +00:00
Merge pull request #1686 from codepodu/master
Fix incorrect code sample
This commit is contained in:
commit
56ac175939
18
website/src/react-native/index.js
vendored
18
website/src/react-native/index.js
vendored
@ -187,19 +187,19 @@ 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>
|
||||
);
|
||||
},
|
||||
}
|
||||
});`}
|
||||
</Prism>
|
||||
<p>
|
||||
|
Loading…
x
Reference in New Issue
Block a user