diff --git a/website/src/react-native/index.js b/website/src/react-native/index.js index 382d5ab1f..f587067c7 100644 --- a/website/src/react-native/index.js +++ b/website/src/react-native/index.js @@ -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 ( {this.state.text} ); - }, + } });`}