Skip to main content

React Native

In React vs. Pure JS we compared React Native to ReactDOM, but it’s not quite that simple. While React Native enables React to render to native platforms like iOS and Android, it also does a bunch of other things like:

  • provide a way to expose platform APIs to javascript code through Native Modules (like control the camera or file picker)
  • provides native classes like RCTRootView, that allow for more than one “rendering surface” for the javascript to drive
  • provides build tooling to help bundle the app’s javascript within the native binary for distribution, install apps on simulators, and manage NPM dependencies with native code from the OSS community
  • bundle developer tooling integrations like Flipper, a built-in inspector tool and debugger interface
  • enable styling views & layout in a way that’s similar to the web (flexbox through a native library called Yoga)
  • handle interoperability with platform API changes as operating systems change (not something that’s as common on the web)
  • baked-in support for development mode vs. release mode (live reload, error overlays, direct integration with the default bundler: Metro)
  • provide a bunch of helpful components out of the box beyond primitives like View and Text
  • probably a lot more I’ve missed?

TODO:

  • overview of components
  • mobile considerations