/ReactCrashCourse

@moshHamedani crash course on react

Primary LanguageJavaScript

This project was bootstrapped with Create React App.

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

react developer tool

chrome extension to debug react applications.

$r.render();
// or
$0.click();

props vs. state

state is internal data and isolated from other ones. props are data passing between components and they are read-only.

lifecycle hooks

mount

  • constructor
  • render
  • componentDidMount

update

  • render
  • componentDidUpdate

unmount

  • componentWillUnmount

special thanks to codewithmosh.com