Search code examples
androidreact-nativeflutterandroid-instant-runhot-reload

Difference between Android's Instant Run vs Flutter's Hot Reload and React Native's Hot Reload?


Currently, I was working on React Native Project, and when I shake the Phone after Running Project it gives me live Updates. as I've also worked with Flutter it also provides me the Same kind of OutPut. but, In Android there is a Functionality called Instant Run.

I've googled Instant Run. and Some of the Results differs Instant Run is not Hot Reload for Android Studio.

so, I want to Know what is the Significant Difference in Working and Feature of Instant Run and Hot Reload?


Solution

  • I can't go into technical details, but here are a few practical differences:

    • Flutter Hot Reload is a lot faster than Instant Run
    • Instant Run sometimes fails and causes a full rebuild, which can take minutes.
    • Flutter Hot Reload is scheduled automatically when you save a file, and there is no lag. Instant Run causes a lot of lag, which is distracting.
    • No state is lost on Flutter Hot Reload, whereas when using Instant Run it often happens that the app is reset
    • Flutter also allows you to restart the app (resetting state) in less than a second (can take minutes in Android)
    • Flutter Hot Reload also works while the app is in background
    • When making changes to the native Android and iOS shell of your Flutter app, Flutter Hot Reload does not help you. You have to do a full rebuild with Gradle/XCode (which will also reset state)