Creating Admin Portal Project in React

From Logic Wiki
Revision as of 11:18, 20 December 2018 by AliIybar (Talk | contribs) (Created page with "Category:React Category:npm == Starting a project == === Setting Up The Environment === * install [https://nodejs.org/en/ node] * install '''create-react-app''' npm...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Starting a project

Setting Up The Environment

  • install node
  • install create-react-app
npm i -g create-react-app

install VS Code

  • install VS Code
  • install VS Code snippets - Click Extensions icon on the left sidebar and search and install
    • Simple React Snippets by Burke Holland
    • Prettier by Esben Petersen
      • Set Format on Save

in VS Code go to File / Preferences / Settings and add the line below in UserSettings section

 "editor.formatOnSave":true

Create React App

Go to the project folder

npx create-react-app adminportal
cd adminportal

adminportal is lowercase because [Create React App] doesn't like capitals

Install Bootstrap

npm i bootstrap@4.1.1

go to ./src/index.js and add this line

import 'bootstrap/dist/css/bootstrap.css';

Coding