Member-only story
React project setup — without any boilerplates
There are a ton of great boilerplates (create-react-app, slingshot, etc) that help you save time and kick-start your app. But most of the time using a boilerplate can be more confusing than setting things up yourself. In this post lets see how we will install everything directly from scratch.
first things first, Lets Installing node and npm (following are for centos or amazon linux)
$ sudo yum install -y gcc-c++ make
$ curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash -
$ sudo yum install -y nodejs# Verify installation
$ node -v
$ npm -v
Create the Project Base Directories
Use the following command to create the project directory and then its base subdirectories and the webpack.config.js file that we will be needing.
$ mkdir <Project Name> && cd $_$ mkdir -p src/{components,containers,styles,utils,views} && touch webpack.config.js
In the same directory, let’s create our node project by using the npm init -y (-y for accepting all the defaults and not to answer any questions) command. After this command finishes, we’ll have a package.json in the same directory, which will allow us to define a repeatable process for building our app in future and in…