const dismissKeyboard = require('dismissKeyboard'); dismissKeyboard(); //dismisses it Approach No# 2;
Thanks to user @ricardo-stuven for pointing this out, there is another better way to dismiss the keyboard which you can see in the example in the react native docs.
Simple import Keyboard and call it's method dismiss()