Install Realm for React Native

On this page

The MongoDB Realm React Native SDK enables development of React Native applications using the JavaScript and TypeScript languages. React Native enables you to build cross-platform iOS and Android apps with a single codebase using the React framework.

Before getting started, ensure your development environment meets the following prerequisites:

Expo does not support Realm

Unfortunately, Expo does not support Realm. If you use the Expo CLI or create-react-native-app to create your React Native project, you will need to "eject" your Expo project to use Realm. The installation steps on this page do not use the Expo CLI.

Realm JS version 10.6.0 Supports Mac Catalyst

For React Native version 0.64 and below, building your Realm React Native application requires additional steps in order to build your application when using Mac Catalyst.

Select the tab below that corresponds to your React Native version. Follow the steps to create a React Native project and add the Realm React Native SDK to it.

Add the following line to the top of your source files where you want to use MongoDB Realm:

Give Feedback

On this page