GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Reading-Notes/301-02.md at main · RobbMAlexander/Reading-Notes

Expand file tree

/

301-02.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
57 lines (31 loc) · 1.63 KB
/

301-02.md

Copy path

File metadata and controls

57 lines (31 loc) · 1.63 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions
layout page
title 301-02 Reading Notes
permalink /301-R2/

React Lifecycle (Outlined Here)

  • Split into several phases:

    • Mounting: Insertion into DOM. Events happen in order:

      • constructor - calls component before mounting; assigns state

      • getDerivedStateFromProps -

      • render - required method for class components. Does not modify state.

      • componentDidMount - called after mounting; used for network dependencies, DOM initialization

    • Updating: Rerendering due to state changes or component updates. Events happen in order:

    • getDerivedStateFromProps

    • shouldComponentUpdate - can be set to false to prevent re-renders on state change.

    • render - (see above)

    • getSnapshotBeforeUpdate -

    • componentDidUpdate - similar to componentDidMount, used for network involvement or other dependencies.

    • UNSAFE_componentWillUpdate

    • UNSAFE_componentWillReceiveProps

    • Unmounting: Component removal. Only event is componentWillUnmount

React State Vs Props (Explained Well Here)

Props

  • Passed into a component from outside

  • Unchanged by component itself

State

  • Updated within component

  • Trigger re-rendering (by default) on changes in state

  • Can store changable version of data (examples-- user data, counters, dynamic displays)

Things I want to know more about

  • performance, longevity, and security advantages/drawbacks of React components & related methods compared to vanilla JS & HTML DOM manipulation
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.