title: Lose focus and dismiss keyboard on clicking outside of the TextInput field in react native?
body: <p>I have already researched about it and found this post:</p>
  
  <p><a href="https://stackoverflow.com/questions/29685421/react-native-hide-keyboard">react-native: hide keyboard</a></p>
  
  <p>But this didn't work for me. When I touch the portion of the screen thats outside the text input field, I was expecting that the input field will lose focus and the keyboard will get dismissed. But, nothing is happening. The cursor keeps blinking on the input.</p>
  
  <p>Below is the code I tried. Please note that I am using redux-form v6:</p>
  
  <pre><code>import dismissKeyboard from 'dismissKeyboard';
  
  &lt;TouchableWithoutFeedback onPress={()=&gt; dismissKeyboard()}&gt;
          &lt;View style={styles.inputWrap}&gt;
            &lt;Field name="editLocation" component={TextField} /&gt;
            &lt;Button onPress={handleSubmit(this.onSubmit)}&gt;Sign In&lt;/Button&gt;
          &lt;/View&gt;
  &lt;/TouchableWithoutFeedback&gt;
  </code></pre>
  
  <p><strong>TextField component</strong> contains TextInput. Not sure if I am doing anything wrong.</p>
  
  <p>I have tested the code on Genymotion emulator with the Samsung S6 image and on my samsung note 4.</p>