Presentation and working demos of React hooks that just went live in React v16.8. Covers what hooks are, some basic to intermediate examples of hooks and how they may affect your React codebases going forward (once you get around to upgrading).
To get started with the code, execute the following commands:
yarn install
yarn start
This presentation uses Deckset to turn the ./presentation.md
markdown file into a working presentation.
This repo includes working, step-by-step examples of the following. These examples can be found in the /src/components/
directory.
- Basic hooks
- Hooks in nested components
- Reducer hooks
- Custom hooks
Below is a list of resources used to compile this repo's information.
- Comment in RFC explaining call-order reliance
- React Conf 18 Hooks keynote
- Making sense of React Hooks by Dan Abramov
- Official Docs - Hooks at a Glance
- Official Docs - Building Your Own Hooks
This project was bootstrapped with Create React App. Visit repo for more detailed instructions about building, ejecting etc.`