Clear Caching on React native Application and some useful command

This is the most important things to clear the cache of React Native Application because of if we add some library to our project then running react native project there are many issues occurs.

In react-native development, there are multiple caches used when the app is built:

  1. React-native packager cache
  2. Emulator cache
  3. Java side cache (.gradle) folder (only in android)
  4. npm cache (if relevant?)  and many other caches.

How to remove cache? 

Run the following command to remove your cache from React Native Application. before running following command, we will require to install the Watchman in our system. how we install watchman. please look once our previous setup React Native blog. https://mobikul.com/setup-react-native/

Remove bundle in the Android platform-

Run the following command to clear bundle, generate new bundle. and then run the React Native Application in your Android device or Emulator.

this command is important when we changing something on our code that is not reflected on our Application (bellow API level 21 devices). if we run above command it generates new bundle every time and code is reflected on our Application.

Ref-  https://gist.github.com/jarretmoses/c2e4786fd342b3444f3bc6beff32098d

 

 

. . .

Comment

Add Your Comment

Be the first to comment.

css.php
Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again
Close