What is the difference between npx create-react-app
and create-react-app
?
React document says do npx creat-react-app
but i see a tutorial in youtube and he say do create-react-app
I tried both of them and both work correctly
What is the difference between npx create-react-app
and create-react-app
?
React document says do npx creat-react-app
but i see a tutorial in youtube and he say do create-react-app
I tried both of them and both work correctly
Share Improve this question edited Dec 20, 2020 at 10:21 Krystian 1321 silver badge10 bronze badges asked Dec 20, 2020 at 9:19 user11880398user118803981 Answer
Reset to default 22npx
will download the package create-react-app
, run it once, then delete it from your disk. If you already have the package installed via npm install -g create-react-app
, you can simply run create-react-app
in your terminal.
It is recommended to use npx
, because it doesn't clog up your filesystem, and because it will always use a package's latest version.
You can learn more from it on the official documentation.