How to Hide Keyboard Programmatically in React Native

The appearance of the Keyboard in your react native app may make behavioral changes in your user interface and hence sometimes we may need to hide the Keyboard to not affect the UI. Hiding or dismissing the keyboard programmatically in react native is pretty easy. You just need to import the Keyboard component from react…

How to Screen Record and Take Screenshots from Android Emulator without using Android Studio

If your PC has low configurations then opening the Android emulator and Android Studio simultaneously may make it slow. In this blog post, I explain how to take screenshots as well as screen records from an Android emulator without opening Android Studio. First of all, you have to launch the Android emulator using the terminal….

How to show SuperScript and SubScript in React Native Text

Sometimes you may need to show superscript and subscript through the react native text component. Superscript characters are small and are slightly above the normal baseline whereas subscript characters appear slightly below. You can use the lineHeight property of the Text component to show superscripts and subscripts. With lineHeight, you can place the text above…

How to Set OnPress Function to View in React Native

In react native, we use onPress prop in touchable components to enable pressing functionality. But, what about having an onPress function for the View component itself? This feature is one of the things I was missing when I compare react native to native Android development. If you are using react native version greater than 0.55.3…

How to Check a Variable is Undefined in React Native

While developing mobile apps with react native, chances are high that you may come across some scenarios where the value of the variable you declared becomes undefined. So, how to check if a variable is undefined or not in react native as well as JavaScript? Earlier I have written about how to check undefined property…