Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we use Realm in React Native project with Expo?

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,

like image 729
ryonz Avatar asked Dec 31 '18 18:12

ryonz


People also ask

Can you use Realm with Expo?

The Realm Expo template provides a fully working React Native application that you can use to bootstrap your app development project with Realm.

Does Mongodb Realm work with Expo?

Realm does not work with earlier versions of Expo or with Expo version 45 on Android.

Can I use native modules with Expo?

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.

Can we use React Native in Expo?

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.

What is the realm Expo template?

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.

Should I use Expo for React Native?

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.

How do I import my Expo project to 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.

Why should I upgrade my React Native module?

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.


2 Answers

Update 24 Jan 2022

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.


Update 2 July 2021

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


Previous answer

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

like image 50
Andrew Avatar answered Nov 18 '22 22:11

Andrew


Finally, Expo now works with realm.

Expo Announcement Guide

like image 42
Quadri Ismail Avatar answered Nov 18 '22 22:11

Quadri Ismail