Member-only story
React Hooks in Action: Building a Todo App (hint: no classes)
What are the Hooks in React?
As React Doc says, Hooks are a new feature proposal that lets you use state and other React features without writing a class. It’s currently in React v16.7.0.
After knowing a bit of react hooks motivation, we’ll be jumping on building an App with React Hooks.
Motivation:
The React Hooks intro gives a good section on this: Classes confuse both people and machines. The gist is classes can sometimes be confusing and can be written any number of ways. That’s when hooks come into the play. Let’s jump into the code, you’ll definitely love it.
What are we building?
We’ll be building a Todo app step by step using React Hooks. As I promised, there will be no classes in this app. The reason, I choose to build a todo app as it covers all 4 aspects of CRUD; Create, Read, Update, Delete. I’m sharing the github repo link as, you can follow the instruction along with the complete code and know the map, where it’s going.
App Live Preview: http://shuvohabib.com/react-hooks-todo-app/build
GitHub Repo Link: https://github.com/ShuvoHabib/react-hooks-todo-app