During development, you run your react native application using the development server provided by Metro Bundler. The development server serves the JavaScript bundle to the device or emulator.
We have three phases in the whole process of running/bundling the application
1. Development server
When you run "npx react-native start", It start the "Metro Bundler" which serves the JavaScript bundle.
2. Bundling and Packaging
When you run "npx react-native run-android" It make build of your react native application and install it in the device and emulator.
3. Code Execution
As you make changes to your code and save it. Metro Bundler detect the changes and reload the app in the device or emulator automatically also known as Hot Reloading.
4. Debugging
You can debug your code using the react native debug tools like ReactDevTools or Flipper.
What is Metro Bundler?
Metro Bundler is a JavaScript bundler that is primarily use in react native development. It serves as development server for react native application. It is responsible for bundling JavaScript code and assets and serving them to development server.
Comments
Post a Comment