quangnd / react-hooks-playground

Experiences with new Hooks API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Experiences with HOOKS ⚓️

See in action at React Hooks Playground

What is hooks

  • Hooks are functions that let you “hook into” React state and life cycle features from function components
  • More information at React Introducing Hooks

Why

  • Hooks allow you to reuse stateful logic without changing your component hierarchy.
  • Hooks let you split one component into smaller functions based on what pieces are related (such as setting up a subscription or fetching data
  • Code is cleaner.

Demo

  1. Toggler
  2. Simple Form
  3. Clicker (with useEffect())
  4. Fetch API at https://swapi.co

About

Experiences with new Hooks API


Languages

Language:JavaScript 80.1%Language:HTML 12.8%Language:CSS 7.0%