How React Native Works
React Native is a framework developed by Facebook that allows developers to build cross-platform mobile applications using a single codebase.
A high-level overview of how React Native:
-
JavaScript and React: React Native uses JavaScript and the React library to build user interfaces.
-
Native Components: React Native provides a set of built-in components that map directly to the native UI components of iOS and Android platforms.
-
Bridge: React Native enables communication between JavaScript and the native code using a
bridge
. It operates asynchronously. -
Native Modules: When functionality is not covered by React Native's built-in components, writing native modules in Objective-C, Swift, Java, or Kotlin allows you to extend functionality to the native platforms (iOS and Android).
-
Flexbox Layout: To make it easier to create responsive UIs that work for different screen sizes, React Native uses Flexbox for layouts.
-
Hot Reloading: To allow developers to see changes made in the code immediately without having to recompile the application, React Native supports hot reloading.