Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

aranab/codearx-react

Repository files navigation

Resource Overview

A project of react developing template

  1. Javascript(ES6 or ECMAScript 6 or ECMAScript 2015, ES2016, ES2017 syntax)
  2. Nodejs and npm
  3. Reactjs
  4. babel 7.x
  5. Webpack and webpack module loaders
  6. Sass
  • To generate distribution(dist) folder: Run > npm run build
  • To start project in webserver: Run > npm start

What is React?

  • A library for user interfaces
  • Create at Facebook and Instagram
  • React Native for mobile
  • React Website
  • github repo
  • Virtual DOM

Efficient rendering with React:

  • DOM Diffing
    • Compares rendered content with the new UI changes
    • Makes only the minimal changes necessary
    • Compares JavaScript objects
    • Is faster than writing to or reading from DOM

Pure React:

Refactoring elements using JSX:

Install react:

  • react: Run > npm install react
  • react-dom: Run > npm install react-dom

Babel inline transpiling:

Babel static transpiling with babel-cli 7.x:

  • Babel cli and core: Run > npm install --save-dev @babel/core @babel/cli
  • Create .babelrc configuration file where all of preset and plugins are enabled
  • Presets
  • Output file generate command npm run babel [source file path] --out-file [destination file path]: Run > ./node_modules/.bin/babel ./src/index.js --out-file ./dist/bundle.js

Building with webpack:

React App:

Create components:

Props:

State:

React Router:

Form Component:

Useful Links:

  • State management by Redux
  • Data management solution by Relay
  • Data management solution by Falcor
  • Data management solution by GraphQL

License

Single license MIT