React Compiler

The Stream Chat SDK for React Native supports React Compiler, allowing you to enable it in your application. You might want to enable it in your application to improve the performance of your application.

React Compiler is best suited to work with the React version 19 or higher.

For React Native CLI, it is recommended to be on version 0.80.0 or higher.

For Expo, it is recommended to be on version 54 or higher, below which you might have to do some extra configuration to make it work.

React Compiler Setup

To install, you can primarily follow this guide from the React documentation: React Compiler

For Expo, refer to the following guide: React Compiler for Expo.

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

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

# or using yarn

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

And, finally enable it in your babel.config.js file:

module.exports = {
  plugins: [
    "babel-plugin-react-compiler", // must run first!
    // ... other plugins
  ],
  // ... other config
};
© Getstream.io, Inc. All Rights Reserved.