React Native application development has gotten one of the quickest and cost-productive intends to deliver cross-platform applications. It helps in making mobile applications that are secure, adaptable, easy to understand, and simple to keep up.
Major updates in React Native 0.61
- Totally different hot reloading experience, called “Fast refresh”.
- React version has been updated to 16.9
- Better CocoaPods support with use_frameworks!
Options Before Fast Refresh
We were having two choices “Live Reload” and “Hot Reload” in the troubleshooting choices before the release of “Quick Refresh”.
If we talk about “Live Reloading” it reloads or refreshes the whole application when a file changes and if there should be an occurrence of “Hot Reloading” it just refreshes the records that were changed without losing the state of the application.
These were extremely helpful features while troubleshooting your application as it reloads your application almost in runtime and you can see the progressions of your application in seconds however the “Hot Reloading” feature was broken. It didn’t turn out dependably for function components and often failed to update the screen. It wasn’t versatile to grammatical errors and mistakes and the majority of people turned it off because it was excessively unreliable.
Fast Refresh Feature
In React Native 0.61 they have brought together the current “Live Reloading” and “Hot Reloading” features into a single new feature called “Fast Refresh” and it was made using scratch.
It is constantly turned on by default and can be accessed under the developer menu. It was executed with the following principles:
- Completely supports modern React, including function components and Hooks.
- Recovers after errors and different typos and falls back to a full reload when required.
- It doesn’t perform invasive code changes so it’s reliable enough to be on by default.
Fast Refresh Tips
- Fast Refresh consistently remounts class components without saving the state. This guarantees it works reliably.
- We all commit errors in the code! Fast Refresh consequently retries delivering after you save a file. You don’t have to reload the application manually after fixing a syntax or a runtime error.
- Adding a console.log or a debugger statement during edits is a perfect debugging procedure.