Skip to content

Instantly share code, notes, and snippets.

View mlimberg's full-sized avatar

Mike Limberg mlimberg

View GitHub Profile

Hooks:

What is it?

Hooks are functions that let you “hook into” React state and lifecycle features from function components.

  • useState
    • deconstruct/define? value name and update function
    • const [name, updateName] = useState('Greg')
  • each time you use a useState hook, it isolates its own state