Problems of Deploying React to Hosting
The code of a React project consists of regular JavaScript files. However, we cannot simply upload a React project to hosting as regular static files.
The point is that during the development of a React website, we require NodeJS. But NodeJS is only needed for website development, and when the website is created and working, NodeJS is no longer required.
Therefore, we cannot simply upload our website files to hosting - they simply will not work without NodeJS.
The correct approach here is the following: when the project is ready for deployment, we need to perform its production build.
As a result of the build, we will get a build, which represents plain static files. This build is what needs to be uploaded to hosting. In the next lessons, we will discuss all the nuances of this process.
Explain why we cannot simply upload React project files to hosting?