From 3acd9a7ec7f99abd4570dafcb486bf6512e722cf Mon Sep 17 00:00:00 2001 From: Website Deployment Script Date: Mon, 1 Jul 2019 14:06:40 +0000 Subject: [PATCH] Deploy website Deploy website version based on c8b01d27d52b177ad39a77f48ed88d512c2c4a9c --- docs/next/handling-text-input.html | 3 ++- docs/next/handling-text-input/index.html | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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.