Moshe Shmukler
Moshe Shmukler

Reputation: 1300

Masking react-native TextInput

I am trying to figure out how to mask TextInput for a react-native app. I am completely new react-native, and I would prefer to not have to code a component for each iOS, Android and potentially Windows. I see a bunch of existing modules for jQuery and regular React. Did not find one for react-native.

How does one go about addressing something like this? Do I attach a listener to the text input field, and rewrite the representation whenever the value of my field changes?

Please advise.

Upvotes: 2

Views: 6100

Answers (1)

Moshe Shmukler
Moshe Shmukler

Reputation: 1300

Ended-up hooking onChangeText and just using a roll-my-own function. Instead of onChangeText, we could also hook event from onChange. The arguments are different text vs event.

Upvotes: 2

Related Questions