ReactJS ships a tool called
create-react-app that can generate a new project for you. This gets one started very quickly. But I see several problems with a generated project:
- The build process is heavily abstracted. Meaning, it hides how Webpack and Babel are used and configured.
- It launches a web server that uses Websocket to automatically refresh a web page when you modify any code.
These may sound like conveniences rather than problems. But neither will be acceptable in most real life projects. We need to be able to configure Webpack and Babel the we like. Also, most likely we will need to go through a regular web server like Nginx etc.
This is also inconvenient for someone who is new to ReactJS and Webpack. So many things are hidden away from you that you think you are not quite learning how the system operates.
In this article I will create a ReactJS project from scratch. We will use Webpack and Babel. We will learn how to configure them.