Why does `npx react-native init` downloads react-native to a temporary folder?

17 Views Asked by At

After some discussion with Gemini, I have a question.

In short, Gemini says npx react-native init downloads react-native in a temporary folder and deletes it after init. Gemini also says that after init, react-native modules are included in the project and I can call commands like react-native run-android directly.

So the question is why doesn't npx install react-native to my project folder in the first place instead of doing the extra work of copying and deleting? What am I missing?

0

There are 0 best solutions below