# React Compiler

The React Native Chat SDK supports [React Compiler](https://react.dev/learn/react-compiler). Enable it to improve performance.

<admonition type="note">

React Compiler works best with React 19+. Use React Native CLI 0.80+ or Expo 54+. Older Expo versions may need [extra configuration](https://docs.expo.dev/guides/react-compiler/).

</admonition>

## Best Practices

- Use a React/React Native version that fully supports the compiler.
- Place the compiler plugin first in `babel.config.js`.
- Verify production builds after enabling to catch plugin conflicts.
- Profile message list screens to confirm real-world gains.
- Keep third-party Babel plugins updated to avoid incompatibilities.

## React Compiler Setup

Follow the React docs for setup: [React Compiler](https://react.dev/learn/react-compiler).

For Expo, see: [React Compiler for Expo](https://docs.expo.dev/guides/react-compiler/).

For React Native CLI, you need to install the following dependencies:

```bash
npm install -D babel-plugin-react-compiler@latest

# or using yarn

yarn add -D babel-plugin-react-compiler@latest
```

Enable it in `babel.config.js`:

```js
module.exports = {
  plugins: [
    "babel-plugin-react-compiler", // must run first!
    // ... other plugins
  ],
  // ... other config
};
```


---

This page was last updated at 2026-04-17T17:33:45.518Z.

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/sdk/react-native/v8/guides/react-compiler/](https://getstream.io/chat/docs/sdk/react-native/v8/guides/react-compiler/).