I am making a Mobile app in React Native with Expo. Now I am thinking that I will use Realm to manage state in my project.
However, I am not sure that I can use Realm on Expo or not. Expo is quite useful to create React Native Mobile Apps easily and quickly, but sometimes there are some conflict with some modules and libraries.
So, could you teach me that Realm can work on Expo or not?
Thank you,
The Realm Expo template provides a fully working React Native application that you can use to bootstrap your app development project with Realm.
Realm does not work with earlier versions of Expo or with Expo version 45 on Android.
The tradeoff is that Expo Go does not allow you to add custom native code, you can only use native modules built into the Expo SDK. There are many great libraries available outside of the Expo SDK, and you may even want to build your own native library.
Expo is a set of tools and services built around React Native and, while it has many features, the most relevant feature for us right now is that it can get you writing a React Native app within minutes. You will only need a recent version of Node.js and a phone or emulator.
The Realm Expo template provides a fully working React Native application that you can use to bootstrap your app development project with Realm. This documentation covers how to initialize and work with the Realm Expo template. Expo, a framework to develop, build and deploy React Native applications quickly.
If you want to avoid using terminals, Expo also provides you with the browser UI interface which looks like this. This is the beauty of react-native and react-native-web, you need to write the code once and can run it on multiple platforms.
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.
If you've ever upgraded React Native or a native module you'll appreciate Expo's ability to seamlessly do this for you by only changing the version number. Expo extends the React Native platform by offering additional, battle-tested modules that are maintained by the team.
The feature request was marked as Complete today.
I can confirm that Realm works with custom dev clients.
Here is an expo/example you can use to get started today --courtesy of the Realm team.
We won't be adding Realm to the Expo Go app (that you download from the App Store or Google Play Store) since we are limiting the amount of native third-party services that we include by default.
The feature request has been marked it as In Progress by the Expo team.
https://expo.canny.io/feature-requests/p/realm
It should be included as part of a custom development client, you can read more about custom development clients here https://blog.expo.dev/introducing-custom-development-clients-5a2c79a9ddf8
From the realm docs
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.
https://docs.mongodb.com/realm/sdk/react-native/install/
It has been a feature request for expo since 2017 https://expo.canny.io/feature-requests/p/support-for-realm
Finally, Expo now works with realm.
Expo Announcement Guide
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With