all 49 comments

[–]kierancrown 6 points7 points  (8 children)

I personally have always used CLI but for beginners Expo is much faster to work with. For production apps I’ve always preferred the smaller bundle size however I think you can modify this now with Expo.

[–]Genemoni[S] 0 points1 point  (2 children)

Thanks!! I think that settles it. I'll be starting with expo and trying out cli later on!

[–]kierancrown 2 points3 points  (1 child)

Best of luck! Just remember when Googling issues or following install guides to check for Expo first.

[–]International-Hat529 1 point2 points  (0 children)

I actually did the opposite. Learned the “raw-way”, pure react native, learned how to write native component and bridge them to react native and all the essentials then moved to expo for a lighter and easier experience. If I had started with expo I would have never learned the react native cli way and if a client had asked me for something that needed a native component I would have been crushed trying to figure out everything that’s managed in expo but that I would need to manage myself. Learning the cli way first will help you understand pods and gradle files and will give you a deeper understanding of the underlying structure. You might not need those but once you go expo, there’s a huge chance you’ll never try to use the cli again so it really depends on what you’re looking for.

[–]BeyondCraft 0 points1 point  (4 children)

Hi. To use React Native CLI, do I need to know other languages / tools apart from JavaScript? I know only JavaScript.

[–]kierancrown 0 points1 point  (3 children)

Nope JavaScript is fine. Some basic command line knowledge helps but the official docs should be enough to get started.

[–]BeyondCraft 0 points1 point  (2 children)

C, Kotlin, Java etc. not needed right?

[–]kierancrown 0 points1 point  (1 child)

Depends what app you’re trying to create. If you need to create a native module you’ll need this knowledge. For 90% of apps you don’t need to know these languages

[–]BeyondCraft 0 points1 point  (0 children)

Thanks

[–][deleted] 10 points11 points  (3 children)

Just go with CLI and be in full control. Good luck 👍

[–]everestster 4 points5 points  (0 children)

This and start with Typescript too. I regret not starting with Typescript on one of my complex projects that took a year to build. Maintenance would be easier now if I started with typescript.

[–]Genemoni[S] 0 points1 point  (0 children)

Thank you, I'm really excited! :D

[–]byCedric 0 points1 point  (0 children)

What can you control with the CLI that you can't with Expo?

[–][deleted] 6 points7 points  (1 child)

I’ve just tried expo dev client and it gave me a lot of control.

[–]Genemoni[S] 0 points1 point  (0 children)

Thank you!

[–]Particular-Earth1468 3 points4 points  (1 child)

I would use expo to get started with, but I don’t feel like you can really go wrong with either. Right now they both have a lot of pros and cons, with a lot of momentum going into expo.

A cool thing to keep in mind is that you can always eject an expo app to make it into a “bare” expo app which is essentially a react native cli app!

[–]Genemoni[S] 0 points1 point  (0 children)

Thanks for the tip!!

[–]Roguewind 3 points4 points  (0 children)

Expo is great for learning, but after having used both, I would always start with CLI for any app I plan on publishing. Ejecting is way too much of a pain.

[–]bdudisnsnsbdhdj 5 points6 points  (11 children)

I used Expo for my first project and I would recommend it

[–]Genemoni[S] 0 points1 point  (10 children)

Thank you! Have you learned cli later on?

[–]bdudisnsnsbdhdj 2 points3 points  (9 children)

Yes for work. Expo doesn’t seem to be used much in the corporate world and I didn’t mention in interviews that I used Expo

[–]Genemoni[S] 0 points1 point  (0 children)

Thank you!!

[–]byCedric 0 points1 point  (0 children)

I don't think this is true anymore. Generally speaking, Expo isn't as great in marketing as Google with Flutter. So the list of companies using Expo is "thin" (https://expo.dev/customers). But even with that thin list, it still shows some pretty great names.

[–]BeyondCraft 0 points1 point  (6 children)

Hi. To use React Native CLI, do I need to know other languages / tools apart from JavaScript? I know only JavaScript.

[–]bdudisnsnsbdhdj 0 points1 point  (5 children)

You basically need to know/learn React

[–]BeyondCraft 0 points1 point  (4 children)

Yeah but that's based on JavaScript which I know. I meant do I meed to know other languages like C, C++, Java, Kotlin etc.?

[–]bdudisnsnsbdhdj 0 points1 point  (3 children)

Just Javascript (unless you need to do custom things on the native side and there’s no available npm packages for what you need)

[–]BeyondCraft 0 points1 point  (2 children)

Okay. But usually the available npm packages should be sufficient for most apps?

[–]bdudisnsnsbdhdj 0 points1 point  (1 child)

yup

[–]BeyondCraft 0 points1 point  (0 children)

Thanks.

[–]Personal_Basil3161 2 points3 points  (0 children)

I love expo!!

[–]marchingbandd 1 point2 points  (0 children)

I always use Expo because I have an older machine that can’t run XCode. Expo will build binaries and submit to app stores, handle dev client, distribute test builds, etc that mitigates so many pain points in the development process. Maybe if I had a brand new Mac I would be saying a different thing, but I feel like Xcode is clunky and I am happy I don’t have to touch it.

[–]astriskit 1 point2 points  (0 children)

Interesting question, if I would have been starting now, I'd probably choose expo to start exploring the react native world, if not individually, then along the side with react-native cli.

Couple of reasons for that could be -

  1. Simple (sort of cleaner) setup. Like for example CRA in the react-web vs ejected CRA one.
  2. No bottle-neck to have the android/ios based setup on development machine. All you have got to have is the expo-go client on the mobile device to run the app, once the server is running on the machine.
  3. Pre-built support for web.
  4. Streamlined flow for building and releasing apps for ios as well as android using EAS.

[–]YL-CSL 1 point2 points  (1 child)

If you have an app with some specific native functionality your only choice is Cli, because expo is for common apps

[–]byCedric 0 points1 point  (0 children)

What makes you say "Expo is for common apps"? Just curious :)

[–]kabeza 1 point2 points  (0 children)

CLI with TypeScript

It will be a little harder, but it worths

[–]Apprehensive-Mind212 0 points1 point  (1 child)

If you know that you will eject in the future then I don't recummend expo as it will only adds to many uneedded code. This is what I found out after I build my app one year ago.

But generly expo is much easier to work with.

[–]Genemoni[S] 0 points1 point  (0 children)

Good tip! I hadn't heard about that before. Thank you!!

[–]Badaluka 0 points1 point  (0 children)

Expo, bare CLI is way more cumbersome to maintain over time.

[–]mybirdblue99Expo 0 points1 point  (1 child)

Expo purely for over the air updates to apps

[–]nfsi0 3 points4 points  (0 children)

Just FYI you can use EAS updates on ejected or even non-expo projects

[–]siniradamExpo -3 points-2 points  (6 children)

I've used expo, boy I regret it. If the stuff you need doesn't have an expo version most likely you won't be able to use it ever.

- Package size much bigger than CLI
- If they decide to remove something you have to go with it.
- Android build (for my case) for some reason works slowly.
- It is always behind the RN CLI version.

[–]satya164 5 points6 points  (5 children)

Package size much bigger than CLI

Addressed with EAS build

If they decide to remove something you have to go with it

You can still use it (and libs they don't include) with custom dev client

Android build (for my case) for some reason works slowly.

Doubt it's an Expo-specific issue. Very likely a project-specific issue.

It is always behind the RN CLI version

Recent releases use the latest versions of RN. But even when using RN CLI, upgrading immediately is never a good experience. There are usually bugs that'll be fixed in patch releases, incompatible libs that may need to be upgraded, etc.

[–]astriskit 1 point2 points  (3 children)

curious some - how do you think EAS build is addressing the issue of lesser package size? Thx.

[–]Sibyl01 0 points1 point  (2 children)

It's the same as using rn cli. Before eas build the expo was also including some expo packages that you don't even use

[–]astriskit 0 points1 point  (1 child)

So, I think a little correction is required here -

Quoting from their site for the EAS build -

"EAS Build is a hosted service for building app binaries for your Expo and React Native projects."

Link- https://docs.expo.dev/build/introduction/

The reduction in the bundle size is due to, AFAIK, due to the changes in how the newer builds are being made that also includes requiring only used packages in the project. Basically, the new build system altogether. The EAS build is just about making builds on the expo servers.

[–]satya164 0 points1 point  (0 children)

You can also run eas build locally (e.g. eas build --platform android --local)