Skip to content
Example App from my Practical Hooks talk
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Example App from my Practical Hooks talk

In my hooks talk for the Cleveland React Meetup, I live-coded a conversion from a class-based app to one using hooks.

This repo has branches containing each step along the way, from the basic class-based app to the completed thing.

I created Pull Requests detailing each step, to make it easy to see diffs along the way. Each pull request has notes on the specific steps taken:

(master and the final branch are identical)

Feel free to leave comments or questions in issues or the PRs - would be happy to discuss anything!

General Hooks Resources:

Here are some resources I've found helpful:

If you'd like to run this locally:

This project was bootstrapped with Create React App.

To install, clone the repo, then run yarn install

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

yarn run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

You can’t perform that action at this time.