Built with ❤︎ by Timothy Merritt
This is a collection of examples illustrating how
React Hooks work, bootstrapped from
a default create-react-app
project.
The hooks
directory in src
contains a JavaScript file for
each of the 10 types of Hooks React makes available. Each Hook is a
self-contained component (with the exception of Hooks with greater scope, e.g.
useContext
) which I've attempted to make as simple as possible in illustrating
state changes, ref values, etc., with very basic UI examples.
You can see the resulting site here, though it is currently still a work in progress.
To use locally, clone the repo:
git clone https://github.com/timmybytes/hooks.git
Open directory and install dependencies:
cd hooks/
npm install
To start the development environment:
npm run start