Answer the question
In order to leave comments, you need to log in
How to install react.js on a project?
Hello, I have a working project and I want to add React.js there to work .
This is the way .
But I watched all the videos from YouTube and Stackoverflow, it doesn’t explain how to do it,
wrote the commands
cd myfolder (project folder)
npm init
(then Enter package.json file was created several times)
then
npm install --save react react-dom
These files
in index.html index.js is connected
and in index.js it is
in the package.json file
how to fix what to do?
Even everything he did Here
, after watching these videos, he did exactly the same at the start
npm run it (test is written instead of it in the picture) gave an error of this kind
Answer the question
In order to leave comments, you need to log in
You don't have any scripts to run. There is no it script. Apparently, not everything was done on video.
You didn’t install webpack with babel, you didn’t configure webpack.config.
Learning React from video tutorials is not the most efficient way, I think.
In your situation, I can advise, perhaps, to leave these video tutorials, since you can’t follow the instructions on the screen and find some kind of course in the form of a series of articles with code examples and study them.
According to the React connection guide from the official site. In addition to copying code examples, train yourself to read everything that is written in the article. They contain all the information about the tools needed to build and run the application and their settings.
The article is about npm, webpack, babel, presses and configurations. And there is even a link to create-react-app .
I think you should start with create-react-app.
If your English is bad, then I can only recommend reading / watching lessons and articles in Russian.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question