IDE stands for Integrated Development Environment and it is a application where you can write your code and has extra features like debugging, syntax highlighting, etc.
React is a JavaScript library.
If I had to guess you are probably using a code editor like visual studio code which is a popular choice for frontend developers.
Or maybe you are using another editor, like atom, brackets, sublime, etc.
Let’s break down what these commands are doing
npm init will create a package.json file for your new project.
This holds information about your project like, name, scripts(ex. command for running the project), the dependencies it uses, etc.
The -y flag (or you could use --yes flag) is used to create a starter package.json file with some basic information filled out for you. Without the use of that flag, then you will be walked through a prompt where you will need to fill out that information yourself.
This is what the default package.json looks like
{
"name": "example-react-app",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
This line of code will install react and react-dom as a dev dependency
Now this is what your package.json file looks like
{
"name": "example-react-app",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
}
}
Yes.
It looks like the article you are following wants you to set everything up from scractch.
But you don’t need to do that.
Most people now a days will use Vite
The command you would run is the following
npm create vite@latest name-of-app-goes-here -- --template react
You would find a folder you want to create your new project in.
Then replace name-of-app-goes-here with the name of your actual project
When you run that command, then everthing is setup for you.
Then you will need to change to that folder and then start the project
npm install
npm run dev
hope that helps