What is the difference 'create-react-app ' and 'yarn create-react-app name '?
I accidentally made a project without 'yarn' or 'npx'. And it worked.
I wonder why and differences.
What is the difference 'create-react-app ' and 'yarn create-react-app name '?
I accidentally made a project without 'yarn' or 'npx'. And it worked.
I wonder why and differences.
create-react-app
might've been already present as a global package in your system so it worked without npx
or yarn
.
If you do npx create-react-app name
then the react app is created after fetching the latest create-react-app
. This is generally recommended.
See https://www.freecodecamp.org/news/npm-vs-npx-whats-the-difference/