mirror of
https://github.com/status-im/react-native.git
synced 2025-01-22 15:29:07 +00:00
6668cd2129
Summary: Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example. Fixes #8261 Closes https://github.com/facebook/react-native/pull/8266 Differential Revision: D3465105 Pulled By: JoelMarcey fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
835 B
835 B
id | title | layout | category | permalink | next |
---|---|---|---|---|---|
basics-component-textinput | TextInput | docs | Basics | docs/basics-component-textinput.html | basics-component-scrollview |
Direct text-based user input is a foundation for many apps. Writing a post or comment on a page is a canonical example of this. TextInput
is a basic component that allows the user to enter text.
This example creates a simple TextInput
box with the string
Hello
as the placeholder when the TextInput
is empty.
import React from 'react';
import { AppRegistry, TextInput, View } from 'react-native';
const App = () => {
return (
<View>
<TextInput placeholder="Hello" />
</View>
);
}
// App registration and rendering
AppRegistry.registerComponent('MyApp', () => App);