CodeBy CodeBy - 17 days ago 5
Node.js Question

react-native TextInput placeholder not visible

I'm make simple screen contains only one TextInput with placeholder, but placeholder on displayed. What is wrong?

MyComponent:

render() {
<TextInput
placeHolder="placeholder"
/>
}


index.js:

export default () => {
<MyComponent />
}


wrapping TextInput into View don't help.

Answer

Looks like you misspelled the prop placeholder to placeHolder. See https://facebook.github.io/react-native/docs/textinput.html#placeholder.

Comments