How to Add or Remove TextInput Dynamically and get Values in React Native

In this blog post, I am going to write about how to dynamically add or remove the TextInput component and get corresponding values from each text input in react native. In this react native dynamic TextInput example, I have three buttons namely add, remove and get values. Pressing add button will add a TextInput component…

How to Add a Material Design Dropdown in React Native Compatible for both iOS and Android

Picker component of react native is used for showing drop down menu in apps. If you are not satisfied with the picker component then you can use react native material dropdown component which works well on both Android and iOS platforms. The drop down component follows material design with ripple effects. You can install react…

|

How to Create a Drawer Navigator with Custom Component in React Native using React Navigation

In this blog post I will walk you through how to create a navigation drawer with custom content component in react native using navigation library react navigation. First of all add react navigation library to your react native project using the following command: npm install react-navigation Now, install react native gesture handler in your project…

How to Increase Start up Speed of React Native Android App using Hermes

Performance of Android apps built with react native is a bit lower when compared to the performance of iOS apps. So how to increase the performance of Android apps built with react native? The answer is by enabling Hermes. Hermes is an open source JavaScript engine optimized for running react native Android apps. It helps…

How to Create a React Native Project with Specific React Native Version

When we create a new react native project we prefer the latest version of react native. But in some situations, we might need to create a new project using a specific react native version. This usually happens when the latest version of react native has many breaking changes and is unstable. react-native init ProjectName is…

How to Create a Navigator without Back Actions in React Native

Update: This tutorial is outdated. I suggest you check out the authentication flow from the official documentation. While creating an authentication flow we usually don’t want the screens to navigate back. In such situations, we want a navigator which resets the navigation history while navigating. In this blog post, I will show you how to…

How to Disable Scrolling on Flatlist in React Native

By default, the behavior of the FlatList component of react native is to scroll. But, in some unusual situations, you may want to disable scrolling in react native FlatList. This blog post goes through how to disable scrolling in FlatList. As you know, FlatList inherits the props of the ScrollView component. Hence you can use…

How to Make your React Native App Restricted to Portrait Orientation

Some famous apps out there such as Instagram are restricted to portrait orientation. You may also want your react native app to support portrait orientation only. By default, react native works on both orientations- portrait and landscape. Let’s check how to restrict the app to portrait in react native. To make the app portrait only…

How to Check a Device is Tablet or not in React Native

There are tons of mobile devices including smartphones and tablets with different dimensions and resolutions. Hence, sometimes it is important for developers to identify the device. In this blog post, I will tell you how to detect whether a device is a tablet or not in React Native. I prefer to use react native device…

How to Pass Data from One Screen to Another while Navigating in React Native

Update: This is an old post. I have created a new tutorial with typescript. Check out the blog post given here. Navigation is an important aspect of any react native mobile application. While navigating from screen to screen, you may also want to pass data. In this blog post, you can learn how to pass…