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 internally by the plugin for cross-platform-safe imports and helper utilities.

The analyzer is intentionally strict and skips any optimizations that may lead to user-facing bugs and behavioral changes.

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'],
};

If you're using Unistyles or Nativewind in your project, refer to these additional setup instructions:

  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 must therefore not be installed as a dev dependency.

Platform Support

React Native Boost supports all platforms. Optimizations are performed on iOS and Android, while falling back to the default components on all other platforms.

Footnotes

  1. Starting from React Native 0.80, react-native-boost@0 prints import deprecation warnings. See react-native-community/discussions-and-proposals #893.

On this page