How do i remove Flipper from
React Native?

How do i remove Flipper from React Native?


Flipper

Flipper has been a game-changer for React Native developers since its debut in version 0.62. Its integration has revolutionized workflows, providing a suite of powerful debugging tools that have long been sought after by the React Native community. This addition heralded a new era of efficiency and effectiveness, significantly enhancing the development experience for all involved.


What's the problem with Flipper now ?

After the React Native update, Flipper is installed automatically and this creates many problems. As for example, slow all Builds, especially on iOS.


I also believe that the build files for both Android and iOS will become larger. In the Pods file, for example, there are numerous Flipper entries. So it will be difficult to update those entries to remove Flipper. In this article, we will apply a simple way to remove Flipper, so you do not need to manually remove a lot of entries, especially in iOS.


How to remove it from IOS ?

To remove it from ios lets go to Podfile and look up at this line of code

# Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
     :flipper_configuration => flipper_config,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."        
Just comment this line

     :flipper_configuration => flipper_config,
  
        

Then run "pod install" inside the iOS directory. It will remove Flipper from iOS.

The output after removal will look like this:


How to remove it from Android ?

  1. Go to the android/app/src/main/java/com/your_project_name/MainApplication.java.
  2. Comment this line of code

 //ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());        

3. Clean and rebuild your application

Alternative of Flipper: https://github.com/infinitered/reactotron

要查看或添加评论,请登录

Abdul Mateen ??的更多文章

社区洞察

其他会员也浏览了