0

looking at the documentation about these two similar commands:

$ react-native link --help
react-native link [options] [packageName]
  links all native dependencies (updates native build files)

and

$ react-native install  --help

  react-native install [options] <packageName>
  install and link native dependencies

I do not understand the difference if we specify the packageName. So, what is the difference between react-native link SOMEPACKAGE and react-native install SOMEPACKAGE?

kolistivra
  • 4,229
  • 9
  • 45
  • 58
  • 1
    The former simply links native dependencies, the latter installs and links. The second example is short hand for `npm install Foo` and `react-native link Foo`. – Dan Feb 25 '19 at 11:57
  • @Dan thanks -- feel free to put it as an answer and I'm happy to accept! – kolistivra Feb 25 '19 at 12:00
  • Just updated. Happy to have helped. – Dan Feb 25 '19 at 12:03
  • See this SO [question](https://stackoverflow.com/questions/49874385/the-use-of-react-native-link-command) for a discussion on what `react-native link` is – Andrew Feb 25 '19 at 15:19

1 Answers1

1

The former simply links native dependencies, the latter installs and links. The second example is short hand for npm install Foo and react-native link Foo.

Dan
  • 8,041
  • 8
  • 41
  • 72