React Native Boost

Getting Started

Install React Native Boost to boost your app's performance with one line of code.

Introduction

React Native Boost consists of two pieces:

  • A Babel plugin that statically analyzes your source code and replaces safe Text and View components with their direct native counterparts, leading to significant performance improvements compared to the JS-based wrapper components.
  • A runtime package used by the plugin for cross-platform-safe imports and helper utilities.

The analyzer is intentionally strict and skips any optimizations that could lead to behavioral changes or other bugs.

Compatibility

react-native-boostReact Native
0.xAll versions1
1.x>=0.83

Getting Started

  1. Install React Native Boost:
npm install react-native-boost
pnpm add react-native-boost
yarn add react-native-boost
bun add react-native-boost
  1. If you use Expo and do not have a babel.config.js yet:
npx expo customize babel.config.js
  1. Add the plugin:
// babel.config.js
module.exports = {
  plugins: ['react-native-boost/plugin'],
};
  1. Restart the development server and clear cache:
npm start -- --clear
pnpm start -- --clear
yarn start --clear
bun run start --clear

Runtime Dependency

The Babel plugin imports optimized components via react-native-boost/runtime, so react-native-boost must be available at runtime and can therefore not be installed as a dev dependency.

Platform Support

React Native Boost supports iOS and Android projects. On Web, React Native Boost safely falls back to the default components, providing full cross-platform support.

Footnotes

  1. Starting from React Native 0.80, react-native-boost@0 prints import deprecation warnings. See here.

On this page