Qudoos
Qudoos

Reputation: 626

React Native Password TextInput throws warnings

I have a TextInput field that I want to use for password as such

<TextInput secureTextEntry="true"></TextInput>

but I keep getting this warning in the iOS emulator and also in the chrome debug tools

Failed propType: Invalid prop `secureTextEntry` of type `string` supplied to `TextInput`, expected `boolean`.

I am on "react-native": "^0.16.0"

Upvotes: 8

Views: 2526

Answers (1)

Nader Dabit
Nader Dabit

Reputation: 53711

Try this:

<TextInput secureTextEntry={ true }></TextInput>

Upvotes: 17

Related Questions