Skip to content

React hook library, ready to use, written in Typescript.

License

Notifications You must be signed in to change notification settings

ymc-maha/usehooks-ts

Β 
Β 

Repository files navigation

usehooks-ts banner


usehooks-ts

React hook library, ready to use, written in Typescript.

License npm bundle size npm All Contributors


npm i usehooks-ts

Created by Julien Caron and maintained with ❀️ by an amazing team of developers.

πŸ“– Summary

🀝 How to Contribute

Thanks for wanting to contribute! It's more than welcome πŸ€—

Content changes

Most content changes (like fixing a typo) can be made without cloning the repository. Simply locate the file you wish to change in the GitHub UI, and click the little edit icon to make your change directly on the GitHub website.

If you need to make any other substantial changes, then follow the project setup steps below.

Fork to submit a Pull Request (PR)

Before starting, make sure you have the good system dependencies:

  • node@16.x
  • pnpm@^8

Note: To easily switch node version, consider Node Version Manager (nvm).

Then fork the repository, clone it and install.

git clone https://github.com/{your_username}/usehooks-ts.git
cd usehooks-ts
pnpm install

Create or update a new hook

# This command generates boilerplate for new hooks.
# Skip if updating an existed hook.
pnpm gen-hook

# start working
pnpm dev
# or
pnpm dev --filter=usehooks-ts # jest --watch
pnpm dev --filter=www # next dev

# Develop
pnpm build
pnpm lint
pnpm test

How is a hook structured?

πŸ“‚ ./packages/usehooks-ts
β”œβ”€β”€ πŸ“‚ useHookName
β”‚  β”œβ”€β”€ πŸ“„ useHookName.demo.tsx # working demo
β”‚  β”œβ”€β”€ πŸ“ useHookName.mdx # the documentation content
β”‚  β”œβ”€β”€ πŸ§ͺ useHookName.test.ts # unit tests
β”‚  β”œβ”€β”€ πŸ“„ useHookName.ts # the hook
β”‚  └── πŸ“„ index.ts
...

When the usehooks-ts is compiled, only the necessary files are used. The other files are copied in the documentation website.

Note: The demo is used in a different way:

  • It's displayed on the website to illustrate how to use the hook.
  • It's deployed as a CodeSandbox on build to let final users play with.

πŸ’š Backers

Big thanks go to all our backers!

Sentry
Sentry
KATT
KATT
Adhi Ravishankar
Adhi Ravishankar
great-work-told-is
great-work-told-is

✨ Contributors

Big thanks go to all our contributors!

Julien
Julien

πŸ–‹ πŸ’» 🎨 πŸ€”
a777med
a777med

πŸ’»
Nguyen Tien Dat
Nguyen Tien Dat

πŸ’»
Elias Cohenca
Elias Cohenca

πŸ–‹
JoΓ£o Deroldo
JoΓ£o Deroldo

πŸ› πŸ’»
Nishit
Nishit

πŸ’»
Jon Koops
Jon Koops

πŸ’»
LoneRifle
LoneRifle

πŸ’»
Viktor
Viktor

πŸ€” πŸ›
Bruno Clermont
Bruno Clermont

πŸ’¬
yoannesbourg
yoannesbourg

πŸ€”
Strange2x
Strange2x

πŸ€”
Jason Pickens
Jason Pickens

πŸ›
Sel-Vin Kuik
Sel-Vin Kuik

πŸ›
isaac
isaac

πŸ›
Bruno RZN
Bruno RZN

πŸ’» πŸ‘€
Nathan Manceaux-Panot
Nathan Manceaux-Panot

πŸ’» πŸ‘€
Dien Vu
Dien Vu

πŸ€”
Oleg Kusov
Oleg Kusov

πŸ€”
Matthew Guy
Matthew Guy

πŸ€”
andrewbihl
andrewbihl

πŸ›
lancepollard
lancepollard

πŸ›
Mukul Bansal
Mukul Bansal

πŸ›
Jean-Luc Mongrain sur la Brosse
Jean-Luc Mongrain sur la Brosse

πŸ’» πŸ€”
Nic
Nic

πŸ–‹
Dan Wood
Dan Wood

πŸ’»
jo wendenbuerger
jo wendenbuerger

πŸ›
Andrew Nosenko
Andrew Nosenko

πŸ›
CharlieJhonSmith
CharlieJhonSmith

πŸ’»
Sullivan SENECHAL
Sullivan SENECHAL

πŸ€” πŸ›
Jason Long
Jason Long

πŸ›
kxm766
kxm766

πŸ›
Quentin
Quentin

πŸ’» πŸ€” πŸ–‹
Daniel Lazar
Daniel Lazar

πŸ’» πŸ›
Mark Terrel
Mark Terrel

πŸ› πŸ’»
Andreas Herd
Andreas Herd

πŸ›
Sonjoy Datta
Sonjoy Datta

πŸ’»
Ilya Belsky
Ilya Belsky

πŸ›
James Barrett
James Barrett

πŸ’»
AbbalYouness
AbbalYouness

πŸ’»
didriklind
didriklind

πŸ’» ⚠️
hexp1989
hexp1989

πŸ’»
Alvaro Serrano
Alvaro Serrano

πŸ–‹
Egehan DΓΌlger
Egehan DΓΌlger

πŸ’»
PabloLION
PabloLION

πŸ› πŸ’»
David Sanchez
David Sanchez

πŸ›
Ajay Raja
Ajay Raja

πŸ›
Andy Merskin
Andy Merskin

πŸ€”
Avirup Ghosh
Avirup Ghosh

πŸ’» πŸ›
Sanne WintrΓ©n
Sanne WintrΓ©n

πŸ›
Alessandro
Alessandro

πŸ›
Andrey Tatarenko
Andrey Tatarenko

πŸ›
Anton Rusak
Anton Rusak

πŸ›
Mahmood Bagheri
Mahmood Bagheri

πŸ’»
Anver Sadutt
Anver Sadutt

πŸ–‹
Bogdan Ailincai
Bogdan Ailincai

πŸ’»
Simeon Griggs
Simeon Griggs

πŸ›
Kepro
Kepro

πŸ›
Jake Lippert
Jake Lippert

πŸ›
Tu Nguyen Anh
Tu Nguyen Anh

πŸ› πŸ’»
Luke Shiels
Luke Shiels

πŸ›
Sergei Kolyago
Sergei Kolyago

πŸ€”
Adham Akmal Azmi
Adham Akmal Azmi

πŸ›
Alek Kowalczyk
Alek Kowalczyk

πŸ›
Sean Callahan
Sean Callahan

πŸ›
Joshua Bean
Joshua Bean

πŸ’» πŸ›
Tim Zhao
Tim Zhao

πŸ›
Patrick
Patrick

πŸ›
Bryce Dorn
Bryce Dorn

πŸ’»
angusd3v
angusd3v

πŸ’»
Davide Di Simone
Davide Di Simone

πŸ›
Jack Herrington
Jack Herrington

πŸ›
Avi Sharvit
Avi Sharvit

πŸ’» πŸ›
Nicolae Maties
Nicolae Maties

πŸ›
Shardul Aeer
Shardul Aeer

πŸ›
Herlon Aguiar
Herlon Aguiar

πŸ›
Alexis Oney
Alexis Oney

πŸ–‹
curtvict
curtvict

πŸ’»
JosuΓ© Cortina
JosuΓ© Cortina

πŸ–‹
Alex / KATT
Alex / KATT

πŸ’»
Mourad EL CADI
Mourad EL CADI

πŸ’» πŸ›
James Hulena
James Hulena

πŸ›
Matthew Hailwood
Matthew Hailwood

πŸ’» πŸ‘€
Michael Norrie
Michael Norrie

πŸ›
Valentin Politov
Valentin Politov

πŸ’»
Marnus Weststrate
Marnus Weststrate

πŸ’»
mancuoj
mancuoj

πŸ–‹
Chat Sumlin
Chat Sumlin

πŸ’»
Owen Haupt
Owen Haupt

πŸ› πŸ–‹
ubarbaxor
ubarbaxor

πŸ’»
Michael Mior
Michael Mior

πŸ› πŸ–‹
Pierre
Pierre

πŸ’»
Harry B
Harry B

πŸ›
Valerie
Valerie

πŸ› πŸ’»
Steven Vachon
Steven Vachon

πŸ’»
Sean Kirby
Sean Kirby

⚠️ πŸ’»
Alecsander Farias
Alecsander Farias

πŸ’»
Rahul Mishra
Rahul Mishra

πŸ’»
Bryant Smith
Bryant Smith

πŸ’» πŸ›
Rob Hannay
Rob Hannay

πŸ’»
Hooriza
Hooriza

πŸ’» πŸ›
ShanSenanayake
ShanSenanayake

πŸ’»
Philip Ghering
Philip Ghering

πŸ’»
Ladislas Dellinger
Ladislas Dellinger

πŸ’»
Haff
Haff

πŸ’»
Lisandro
Lisandro

πŸ’»
Amir hossein rezaei
Amir hossein rezaei

πŸ’»
Nicolas Macian
Nicolas Macian

πŸ› πŸ’»
Nate Forsyth
Nate Forsyth

πŸ’»
satelllte
satelllte

πŸ’» πŸ›
Federico Panico
Federico Panico

πŸ’»
William Pei Yuan
William Pei Yuan

πŸ’»
Mihai
Mihai

πŸ’» πŸ›
Habib Ogunsola
Habib Ogunsola

πŸ–‹
Ash Furrow
Ash Furrow

πŸ’»
Daniel TuruΘ™
Daniel TuruΘ™

πŸ’»
Rahul Chaudhary
Rahul Chaudhary

πŸ–‹ πŸ›
Joshua Ojoawo
Joshua Ojoawo

πŸ€” πŸ›
Jack
Jack

πŸ’»
Jon Linkens
Jon Linkens

πŸ’» πŸ›
Jeongjin Oh
Jeongjin Oh

πŸ›
Tianning Li
Tianning Li

πŸ’»
Lars Artmann
Lars Artmann

πŸ–‹
KBobovskiy
KBobovskiy

πŸ’»
✨ Kathryn Gonzalez ✨
✨ Kathryn Gonzalez ✨

πŸ–‹
Yaroslav Chapelskyi
Yaroslav Chapelskyi

πŸ–‹
Samuel Van Erps
Samuel Van Erps

πŸ‘€
ojolowoblue
ojolowoblue

πŸ–‹
Andrii Kostenko
Andrii Kostenko

πŸ’»
Akeem Allen
Akeem Allen

πŸ’» πŸ›
trongbinhnguyen
trongbinhnguyen

πŸ–‹
Aniruddha Sil
Aniruddha Sil

πŸ’»
λ°•μ°¬ν˜
λ°•μ°¬ν˜

πŸ‘€
Anish
Anish

πŸ’»
Hugo Hutri
Hugo Hutri

πŸ–‹
Balz Guenat
Balz Guenat

πŸ’»
OtterGeorge
OtterGeorge

πŸ’»
Samay Sagar
Samay Sagar

πŸ–‹
Pedro Lisboa
Pedro Lisboa

πŸ›
Henrique Malheiros
Henrique Malheiros

πŸ›
Kevin Newman
Kevin Newman

πŸ’»
a503189
a503189

πŸ–‹
Mourad EL CADI
Mourad EL CADI

πŸ’»
Pedro Henrique Lopes
Pedro Henrique Lopes

πŸ’»
Danbi Lee
Danbi Lee

πŸ’»
Connor Jennings
Connor Jennings

πŸ’»
Lucas Gomes
Lucas Gomes

πŸ› πŸ’»
Martin Zagora
Martin Zagora

πŸ’»
KvD
KvD

πŸ’»
Alex
Alex

πŸ’»
Kacey Cleveland
Kacey Cleveland

πŸ‘€
Avirup Ghosh
Avirup Ghosh

πŸ›
yabbal
yabbal

πŸ’»
Craig Patik
Craig Patik

πŸ›
Soldeplata Saketos Candela
Soldeplata Saketos Candela

πŸ’»
TENDOUZHI
TENDOUZHI

πŸ›
Marcin Wachulski
Marcin Wachulski

πŸ›
Salman Fazal
Salman Fazal

πŸ›
shrugs
shrugs

πŸ›
hyodori
hyodori

πŸ›
Eleazar β€œE” Ramos
Eleazar β€œE” Ramos

πŸ›
retnag
retnag

πŸ›
J young Lee
J young Lee

πŸ›
Filip Weiss
Filip Weiss

πŸ›
Marius Gundersen
Marius Gundersen

πŸ›
Syed Aman Ali
Syed Aman Ali

πŸ›
Axel Ingadi
Axel Ingadi

πŸ›
AndyP
AndyP

πŸ›
ishanVaghasiya
ishanVaghasiya

πŸ›
Nico Martinucci
Nico Martinucci

πŸ›
Shiv Bhonde | shivbhonde.eth
Shiv Bhonde | shivbhonde.eth

πŸ›
fritzmonkey
fritzmonkey

πŸ›
Rodrigo Mesquita
Rodrigo Mesquita

πŸ›
Moshe Simantov
Moshe Simantov

πŸ›
Beka
Beka

πŸ›
Abdallah Alkaser
Abdallah Alkaser

πŸ›
Carl Smith
Carl Smith

πŸ›
Orlando Groppo
Orlando Groppo

πŸ›
MartΔ³n Saly
MartΔ³n Saly

πŸ›
Quinn Shanahan
Quinn Shanahan

πŸ›
Antoine Kingue
Antoine Kingue

πŸ›
Ε½an Ε½lender
Ε½an Ε½lender

πŸ›
Sebastian Dominguez
Sebastian Dominguez

πŸ›
James Cowan
James Cowan

πŸ›
Bayram Ali Basgul
Bayram Ali Basgul

πŸ›
Wyatt Castaneda
Wyatt Castaneda

πŸ›
Tim Neville
Tim Neville

πŸ›
Thomas Pigarelli
Thomas Pigarelli

πŸ›
James Herdman
James Herdman

πŸ›
Grzegorz Pociejewski
Grzegorz Pociejewski

πŸ›
RenΓ© Verheij
RenΓ© Verheij

πŸ›
PatrykKuniczak
PatrykKuniczak

πŸ›
Paolo BoΕΎac
Paolo BoΕΎac

πŸ›
Rein
Rein

πŸ›
FloorianB
FloorianB

πŸ›
Xuan Hung
Xuan Hung

πŸ›
Monawwar Abdullah
Monawwar Abdullah

πŸ›
Haroldo de Oliveira Pinheiro
Haroldo de Oliveira Pinheiro

πŸ›
Tamjid Ahmed
Tamjid Ahmed

πŸ›
jv-lopez
jv-lopez

πŸ›
Callum Macrae
Callum Macrae

πŸ›
bywater529
bywater529

πŸ›
Kevin He
Kevin He

πŸ›
FredericoGauz
FredericoGauz

πŸ›
Jonathan
Jonathan "JonLem" Lemos

πŸ›
Xegulon
Xegulon

πŸ›
Tom Smedley
Tom Smedley

πŸ›
lightbluepoppy
lightbluepoppy

πŸ›
Derek Oware
Derek Oware

πŸ›
Lance Gliser
Lance Gliser

πŸ›
J. Lewis
J. Lewis

πŸ›
Yair
Yair

πŸ›
Nishchit
Nishchit

πŸ›
Devofy
Devofy

πŸ›
Josh Guyette
Josh Guyette

πŸ›
Dora Li
Dora Li

πŸ›
Kristian Gerardsson
Kristian Gerardsson

πŸ›
James Powell
James Powell

πŸ›
Boaz Poolman
Boaz Poolman

πŸ›
roker15
roker15

πŸ›
Fadhil Ahmad
Fadhil Ahmad

πŸ›
Chandler-Zhu
Chandler-Zhu

πŸ›
Nghi Nguyen
Nghi Nguyen

πŸ›
Shravan Sunder
Shravan Sunder

πŸ›
Johannes5
Johannes5

πŸ›
sebahhpeya
sebahhpeya

πŸ›
Or Nakash
Or Nakash

πŸ›
Erez Makavy
Erez Makavy

πŸ›
Andy Merskin
Andy Merskin

πŸ›
ChainAlert Bot
ChainAlert Bot

πŸ›
Taylor Morgan
Taylor Morgan

πŸ›
wisdomabioye
wisdomabioye

πŸ›
Samuel QuiΓ±ones
Samuel QuiΓ±ones

πŸ€”

This project follows the all-contributors specification (emoji key). Contributions of any kind welcome!

πŸ“ License

This project is MIT licensed.

About

React hook library, ready to use, written in Typescript.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 92.6%
  • JavaScript 6.2%
  • Other 1.2%