diff --git a/docs/next/props.html b/docs/next/props.html index 638d5b60540..cdb24925b17 100644 --- a/docs/next/props.html +++ b/docs/next/props.html @@ -61,7 +61,9 @@ AppRegistry.registerComponent('AwesomeProject', () => Bananas); class Greeting extends Component { render() { return ( - <Text>Hello {this.props.name}!</Text> + <View style={{alignItems: 'center'}}> + <Text>Hello {this.props.name}!</Text> + </View> ); } } @@ -80,7 +82,7 @@ AppRegistry.registerComponent('AwesomeProject', () => Bananas); // skip this line if using Create React Native App AppRegistry.registerComponent('AwesomeProject', () => LotsOfGreetings); - +
Using name as a prop lets us customize the Greeting component, so we can reuse that component for each of our greetings. This example also uses the Greeting component in JSX, just like the built-in components. The power to do this is what makes React so cool - if you find yourself wishing that you had a different set of UI primitives to work with, you just invent new ones.
The other new thing going on here is the View component. A View is useful as a container for other components, to help control style and layout.
Using name as a prop lets us customize the Greeting component, so we can reuse that component for each of our greetings. This example also uses the Greeting component in JSX, just like the built-in components. The power to do this is what makes React so cool - if you find yourself wishing that you had a different set of UI primitives to work with, you just invent new ones.
The other new thing going on here is the View component. A View is useful as a container for other components, to help control style and layout.
textContentTypeGive the keyboard and the system information about the expected semantic meaning for the content that users enter.
For iOS 11+ you can set textContentType to username or password to enable autofill of login details from the device keychain.
For iOS 12+ newPassword can be used to indicate a new password input the user may want to save in the keychain, and oneTimeCode can be used to indicate that a field can be autofilled by a code arriving in an SMS.
To disable autofill, set textContentType to none.
Possible values for textContentType are:
telephoneNumberusernamepasswordnewPasswordoneTimeCode