Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When to use expo, npm and yarn while writing commands in terminal?

There are two parts to this question:

  1. I have recently started working on react-native and I am struggling to understand where do we use npm, expo, npx or yarn. I am working on a mac machine and trying to run my app on ios simulator.

  2. Once globally if I install react-native, Am I required it independently in each project when I create.

like image 977
sver Avatar asked Oct 30 '25 21:10

sver


1 Answers

You can create your own app through expo cli or react-native-cli. There are some advantages and disadvantages on both cli.

Both cli recommend you to install dependency packages through npm or yarn. So you can use anyone. If you notice the doc of react-native, you can see that packages installation instructions are provided for both npm and yarn.

Advantage of expo-cli

  1. You can run your app through expo client's app, no need to install the apk.
  2. Also after running your app with expo-cli you can run your app by scanning the QR code.

The main disadvantage of expo-cli is, normal hello-world app's apk file is too big.

Advantage of react-native-cli

  1. You can fully control your app on this cli
  2. App's size is not too big as expo-cli

You can't run your app through QR code like expo. You have to install the apk file.

Also there are more advantages and disadvantages both cli have. I am using react-native-cli.

Hope this would be helpful for you. Thank you.

like image 107
Shahnawaz Hossan Avatar answered Nov 02 '25 04:11

Shahnawaz Hossan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!