Practical React Hooks talk
Practical React Hooks talkIn my hooks talk for the Cleveland React Meetup , I live-coded a conversion from a class-based app to one using hooks. I have published the code from the talk on GitHub .
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:
- Step 1 - Convert Filter component
- Step 2 - Convert SelectUsers component
- Step 3 - Create useLoad custom hook and integrate into App component
- Step 4 - Convert Todos component
- Bonus Step 5 - Move api client into Context
- Bonus Step 6 - Create a UserFilter Context and Custom Hook
Feel free to leave comments or questions in issues or the PRs - would be happy to discuss anything!
It was a pleasure to deliver this talk and kick off a new meetup. I definitely learned some things along the way - and perhaps some things I'd do differently were I to give this talk again. But, I think overall it was a success!