React Native Boost

Overview

What React Native Boost can optimize and the cases it safely skips.

React Native Boost includes different optimizers that optimize different parts of your app.

Shared component safety rules

When optimizing a component, all optimizers first confirm that the component comes from react-native. A component from another package, or a local component with the same name, is not changed.

Boost also skips a component when:

  • Its file matches an ignores pattern.
  • Its line has @boost-ignore.
  • Required information is only available at runtime.

Set logLevel: 'debug' to see why a component was skipped.

Controlling optimizers

Most optimizers are enabled by default. Exceptions are:

You can turn each optimizer on or off in metro.config.js:

module.exports = withBoostConfig(config, {
  optimizations: {
    'native-image': 'off',
    'animated-wrapper-removal': 'on',
  },
});

See Configure Boost for all options.

On this page