Search code examples
javascriptreact-nativefocus

How to know when the focus is lost in a react native textInput?


How to know when the focus is lost in a react native textInput?

For example I want to do an action when the user touches outside the textInput and it loses focus.


Solution

  • The prop you are looking for is the onBlur. This is called when it loses focus.