React native project eject

#1

Hi, I’ve seen some react native third party libraries that requires linking and ejection. But I am confused about the concept “eject”. If I eject my project, can I still develop using react native and what exactly does “eject” do to my project? What is the down side of ejecting a project and can I eject an expo project? Thanks and would really appreciate any comments.

1 Like
#2

If you start a project with Expo, you typically write just JS.

If you eject, then you get an Xcode project (for iOS) and an Android Studio project (for Android) that you have to build yourself but you’re then able to write native code to do anything you want.

After you eject, you can continue to write React Native JS – it’s very normal to do so!

Ejecting is just a concept for Expo apps. If you do a React Native project without Expo, you are basically already ejected.

The downside of ejecting is that you lose a lot of the conveniences that Expo provides. For example, if you write native code and add it into your app, you can’t use the Expo Client from the App Store to develop it anymore since the Expo Client app from the App Store doesn’t have your native code in it.

Does this make sense?

1 Like
#3

Hi, thanks for answering my question. You answer helps me a lot. I have a follow up question, so after eject, will the publish process be same as using EXPO?

#4

Yes, unless you modify your ejected app to use some other code deployment system (which is something you can do if you eject).

#5

cool, cool, the reason I am considering eject is that I am looking for some image filters and image picker that can select multiple images at the same time. The current EXPO SDK image picker can only choose one image. I am really a big fan of expo and don’t want to eject it. But is there any resource I can use to have an image picker that can choose multiple pictures at the same time? Thanks

#6

we’re working on improving the image picker stuff but i’m not sure when it will be done so in the meantime, yeah, ejecting is the way to be able to build something like that if you don’t want to wait.

hope to have everything you need soon so that you don’t have to eject!

2 Likes
#7

Thanks man. Really appreciate your help here!

#8

Actually one more question just came up, if I eject and I cannot use Expo client, then can I still test my product with multiple iphones?

#9

Yeah. Should work. You’ll just need to install the new binary on each one whenever you change native code.

1 Like
#10

Hello, I created an app with create-react-native-app a few days ago but now I have to add some native code to it, which means I have to eject. Am I right to assume that even after I eject and add some native code, I can still build and run my app by scanning the QR-code in the Expo app on my Iphone? Or can I not do that anymore after I eject?

#11

When you eject and add native code you will need to build your native app binaries yourself with Xcode or Android Studio. The Expo client loads only JS (no native code) so this is a technical limitation.

#12

Ahh okay I see, thank you for replying!

#13

if I created the project with “react native init” after I cannot use expo SDK like pedometer?

closed #14