diff --git a/docs/next/handling-text-input.html b/docs/next/handling-text-input.html index 3ae88bcc963..a63d1198f48 100644 --- a/docs/next/handling-text-input.html +++ b/docs/next/handling-text-input.html @@ -88,6 +88,7 @@ style={{height: 40}} placeholder="Type here to translate!" onChangeText={(text) => this.setState({text})} + value={this.state.text} /> <Text style={{padding: 10, fontSize: 42}}> {this.state.text.split(' ').map((word) => word && '🍕').join(' ')} @@ -99,7 +100,7 @@ // skip this line if using Create React Native App AppRegistry.registerComponent('AwesomeProject', () => PizzaTranslator); - +

In this example, we store text in the state, because it changes over time.

There are a lot more things you might want to do with a text input. For example, you could validate the text inside while the user types. For more detailed examples, see the React docs on controlled components, or the reference docs for TextInput.

diff --git a/docs/next/handling-text-input/index.html b/docs/next/handling-text-input/index.html index 3ae88bcc963..a63d1198f48 100644 --- a/docs/next/handling-text-input/index.html +++ b/docs/next/handling-text-input/index.html @@ -88,6 +88,7 @@ style={{height: 40}} placeholder="Type here to translate!" onChangeText={(text) => this.setState({text})} + value={this.state.text} /> <Text style={{padding: 10, fontSize: 42}}> {this.state.text.split(' ').map((word) => word && '🍕').join(' ')} @@ -99,7 +100,7 @@ // skip this line if using Create React Native App AppRegistry.registerComponent('AwesomeProject', () => PizzaTranslator); - +

In this example, we store text in the state, because it changes over time.

There are a lot more things you might want to do with a text input. For example, you could validate the text inside while the user types. For more detailed examples, see the React docs on controlled components, or the reference docs for TextInput.