Month: October 2019

How to use MomentJS library with React Native

MomentJS is an extremely useful JavaScript library when you have some complex things to do with date and time. It parse, validate, manipulate, and display dates and times in JavaScript. Let’s check how to use momentJS library with react native. Install Moment.js library in your react native project using any of the commands given below. …

How to use MomentJS library with React Native Read More »

How to Disable Yellow Box Warnings in React Native

Yellow box warnings are useful while developing react native mobile apps. Even though warnings are not critical as red box errors, the yellow boxes catch the attention of the developer to attend the issue. Proper fixing of the warnings can make your app more optimised. But, there are some scenarios where the yellow box warnings …

How to Disable Yellow Box Warnings in React Native Read More »

GestureHandler already initialized for root view com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView React Navigation Issue Fix

Straight to the point, I faced the following react native error when I ran one of my react native project. GestureHandler already initialized for root view com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView{736d100 V.E…… …….D0,0-1080, 1962 #29} Yes, the error is related with react native gesture handler library I used in association with react navigation library. React native gesture handler is …

GestureHandler already initialized for root view com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView React Navigation Issue Fix Read More »

5 Console Tricks For Better Debugging in React Native

console.log() method is the easiest way to debug your code in React Native. Simply showing the results in the console can save your time. What if you know some console tricks which can make your debugging better? Here, I am going through five cool console methods for better debugging experience in React Native. console.error() When …

5 Console Tricks For Better Debugging in React Native Read More »

How to Create a Gradient Color Button in React Native

Sometimes, buttons with plain colors can be boring visually. Adding a button with multiple colors can make your button uber-cool in appearance – only if it matches your user interface and color selection. In this blog post, let’s check how to create a button with gradient colors in React Native. You might know that react …

How to Create a Gradient Color Button in React Native Read More »

Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function React Native Error Fix

Last Updated on October 23, 2019. While I was working on a react native project, I suddenly came across this particular react native error. Here’s the full error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your …

Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function React Native Error Fix Read More »

Requiring unknown Module “1171” React Native Error Fix

While developing react native apps, you may face unexpected errors that appear from nowhere. I faced one such react native error recently. It says Requiring unknown module “1171”. If you are sure the module is there, try restarting Metro Bundler. You may also want to run `yarn`, or `npm install` (depending on your environment). In …

Requiring unknown Module “1171” React Native Error Fix Read More »

How to Create Linear Gradient Background in React Native

React Native doesn’t support gradient colors out of the box. Fortunately, there is a cool library named react native linear gradient which helps to use gradient patterns in react native apps. In this blog post, let’s see how to create a gradient background for any screen in react native using react native linear gradient library. …

How to Create Linear Gradient Background in React Native Read More »

How to change the Cursor Color of TextInput Component in React Native

Last Updated on October 15, 2019. A react native project without using TextInput component can be a strange thing. In this blog post, I will show you how to change the color of TextInput cursor. Yes, it’s a simple thing but it can have significance when you are designing your react native app. Text input …

How to change the Cursor Color of TextInput Component in React Native Read More »