Skip to content

andrewevans0102/react-custom-hooks-examples

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 

React Custom Hooks Examples

This is a companion project to my post Writing Custom Hooks with React.

The project has 3 example components that are all basically the same "To-Do" list:

  1. ToDoListUseState.tsx is a component that only uses the useState hook
  2. ToDoListCustomHooks.tsx is a component that uses a custom hook called useList
  3. AdvancedToDoList.tsx is a component that also uses the useList hook along with a hook called useLocalStorage

The post walks you through starting with the built in useState hook, and then transitioning to writing your own hooks. In addition to my post, I recommend you check out the React Rules on Hooks and the page on creating your own hooks.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published