Collection of beginner-friendly real world examples of hook usage.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 7c54e28 Nov 7, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
public Initial commit from Create React App Nov 2, 2018
src extracting methods Nov 7, 2018
.gitignore initial commit Nov 3, 2018 Update Nov 7, 2018
package.json initial commit Nov 3, 2018
yarn.lock initial commit Nov 3, 2018

Warning! Hook API is experimental and is going to change in the future. Please refer to original documentation.

Hooks. People love them, people hate them. But one is for sure - hooks are there to stay and React ecosystem is going to evolve, again.

The most important feature of hooks is sharing reusable functionality. In the past it was achieved using mixins, which were later deprecated in favor of patterns like render props and higher order components. But these patterns introduced additional complexity and resulted in something now called wrapper hell.

What is this?

The purpose of this reposity is to provide beginner-friendly real-world examples of different hooks usage. Here are some of them:

This application is built using create-react-app, so feel free to clone the repo and play with examples yourself.

yarn install
yarn start


More examples, more comments. Pull requests and overall suggestions are welcome.