Dismissing Keyboard in React Native
18:59 04 Aug 2020

I have multiple components in my app where I get user inputs using a keyboard. Now I want to dismiss the keyboard whenever user presses outside of the text input field.

I know there is TouchableWithoutFeedback in which I can wrap my component, but whats the best way to do it for multiple screens having this issue.

Shall I create a HOC for this that handles TouchableWithoutFeedback ??

javascript reactjs react-native keyboard touchableopacity