diff --git a/README.md b/README.md index c8dbf0814..39e753753 100644 --- a/README.md +++ b/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 ( {this.state.text} );