📄 Table of contents

Creating a Toolchain from Scratch

◉ Create-React-App



Updates To create-react-app


Nodejs/npm (install this first of all)$ npx install -g create-react-app. // yes its npx and not npm$ create-react-app — version$ create-react-app version: 1.4.3$ create-react-app new-project
# new-project is the directory where you want to develop your application. It takes some time over here to create the minimal basic folder structure.
$ cd new-project$ yarn start // or npm start
initial folder structure
Our default starter React project

Exploring Our First App

<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
<title>React App</title>
You need to enable JavaScript to run this app.
<div id="root"></div>
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.

Wait, What Is JSX?

◉ Setting Up a Redux Project With Create-React-App

[1]. npm install -g create-react-app# Installs create-react-app globally[2]. create-react-app new-project.    #create a new project,
[3]. cd new-project
[4]. npm start
npx create-react-app redux-cra
cd redux-cra
npm start

A Glimpse of a CRA Project Folder Structure

Redux Setup

npm install redux react-redux redux-thunk --save

Action Creators

export const simpleAction = () => dispatch => {
payload: 'result_of_simple_action'


export default (state = {}, action) => {
switch (action.type) {
return {
result: action.payload
return state

Provider Store

import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux'
import configureStore from './store';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';

<Provider store={configureStore()}>
<App />


Connect React Component to Store

export default connect()(App);
export default connect(mapStateToProps, mapDispatchToProps)(App);

Experience with Front-end Technologies and MERN / MEAN Stack. Working on all Major UI Frameworks like React, Angular.