Codecademy - Learn React: Hooks

Notes taken while going through the Codecademy Learn React: Hooks course

The State Hook

Why Use Hooks

Update Function Component State

Initialize State

Use State Setter Outside of JSX

Set From Previous State

Arrays in State

Objects in State

Seperate Hooks for Seperate States

Review: State Hooks

Codecademy - React Hooks Cheatsheet

The Fetch Hook

Function Component Effects

Clean up Effects

Control when Effects are Called

Fetch Data

Rules of Hooks

Separate Hooks for Separate Effects

Review: Effect Hook