Skip to content

iamdcj/hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hooks

Hooks provide stateful components, without needing to use classes.

Prior to the advent of Hooks, function components were used for presentation purposes, and classes were used when working with state/logic. In a nutshell, hooks add state to functional components.

Benefits

Hooks provide a number of benefits which you don't currently get with 'stateful' class components, including;

  • Cleaner components - hooks provides a way for related logic to be grouped in sensible methods, opposed to the prescribed lifecycle methods bundled into React class components.

  • A better way for sharing functionality - stateful logic can be taken away from components, providing easier reuse and testability. Classes handled all logic directly in the component.


This project was bootstrapped with Create React App.

About

A collection of React hooks 🎣

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors