• Stars
    star
    5,387
  • Rank 7,651 (Top 0.2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 4 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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:

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 types-check
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
...

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 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.

✨ Contributors

Big thanks goes to these wonderful people ❀️


Julien

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

a777med

πŸ’»

Nguyen Tien Dat

πŸ’»

Elias Cohenca

πŸ–‹

JoΓ£o Deroldo

πŸ› πŸ’»

Nishit

πŸ’»

Jon Koops

πŸ’»

LoneRifle

πŸ’»

Viktor

πŸ€” πŸ›

Bruno Clermont

πŸ’¬

yoannesbourg

πŸ€”

Strange2x

πŸ€”

Jason Pickens

πŸ›

Sel-Vin Kuik

πŸ›

isaac

πŸ›

Bruno RZN

πŸ’» πŸ‘€

Nathan Manceaux-Panot

πŸ’» πŸ‘€

Dien Vu

πŸ€”

Oleg Kusov

πŸ€”

Matthew Guy

πŸ€”

andrewbihl

πŸ›

lancepollard

πŸ›

Mukul Bansal

πŸ›

Jean-Luc Mongrain sur la Brosse

πŸ’» πŸ€”

Nic

πŸ–‹

Dan Wood

πŸ’»

jo wendenbuerger

πŸ›

Andrew Nosenko

πŸ›

CharlieJhonSmith

πŸ’»

Sullivan SENECHAL

πŸ€” πŸ›

Jason Long

πŸ›

kxm766

πŸ›

Quentin

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

Daniel Lazar

πŸ’» πŸ›

Mark Terrel

πŸ› πŸ’»

Andreas Herd

πŸ›

Sonjoy Datta

πŸ’»

Ilya Belsky

πŸ›

James Barrett

πŸ’»

AbbalYouness

πŸ’»

didriklind

πŸ’»

hexp1989

πŸ’»

Alvaro Serrano

πŸ–‹

Egehan DΓΌlger

πŸ’»

PabloLION

πŸ› πŸ’»

David Sanchez

πŸ›

Ajay Raja

πŸ›

Andy Merskin

πŸ€”

Avirup Ghosh

πŸ’» πŸ›

Sanne WintrΓ©n

πŸ›

Alessandro

πŸ›

Andrey Tatarenko

πŸ›

Anton Rusak

πŸ›

Mahmood Bagheri

πŸ’»

Anver Sadutt

πŸ–‹

Bogdan Ailincai

πŸ’»

Simeon Griggs

πŸ›

Kepro

πŸ›

Jake Lippert

πŸ›

Tu Nguyen Anh

πŸ› πŸ’»

Luke Shiels

πŸ›

Sergei Kolyago

πŸ€”

Adham Akmal Azmi

πŸ›

Alek Kowalczyk

πŸ›

Sean Callahan

πŸ›

Joshua Bean

πŸ’»

Tim Zhao

πŸ›

Patrick

πŸ›

Bryce Dorn

πŸ’»

angusd3v

πŸ’»

Kevin Dai

πŸ’»

Gomes

πŸ’»

Davide Di Simone

πŸ›

Jack Herrington

πŸ’» πŸ›

Avi Sharvit

πŸ’»

Nicolae Maties

πŸ›

Shardul Aeer

πŸ›

Herlon Aguiar

πŸ›

Alexis Oney

πŸ–‹

curtvict

πŸ’»

JosuΓ© Cortina

πŸ–‹

Alex / KATT

πŸ’»

Mourad EL CADI

πŸ’»

James Hulena

πŸ’»

Matthew Hailwood

πŸ’»

Michael Norrie

πŸ›

Valentin Politov

πŸ’»

Marnus Weststrate

πŸ’»

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

πŸš— Roadmap

  • Unit-test all hooks
  • Add more hooks

πŸ“ License

This project is MIT licensed.

More Repositories

1

gatsby-material-typescript-starter

A simple starter using Typescript & Material-ui
TypeScript
7
star
2

awesome-stars

A curated list of my Github stars powered by @maguowei/starred
5
star
3

trend-trading-bot

[WIP] Cryptocurrencies trend-following trading bot sandbox written in Rust.
Rust
5
star
4

react-gallery

Learning front-end project : Skeleton > Blur Thumbnail > Image lazy-loading using TDD
TypeScript
4
star
5

rust-web3-basics-tutorial

discovering web3 using rust
Rust
3
star
6

gatsby-starter-mdx-themeui

A simple Gatsby starter powered by MDX and Theme UI
JavaScript
3
star
7

3cubes-website

Landing page for an NFT project that rewards trees holders from the CO2 absorption.
TypeScript
3
star
8

new-tab

Yet another tab chrome extension.
TypeScript
3
star
9

solana-anchor-crud

The Complete Guide to Full Stack Solana Development tutorial
JavaScript
3
star
10

whiteboard

Experimental personal learning project - Building a web whiteboard to draw mind-maps or mock-ups
TypeScript
3
star
11

the-algorithm-challenge

Let's practice the algorithms and data-structures using Typescript, Rust and TDD (The exercises are from FreeCodeCamp)
TypeScript
3
star
12

ts-blockchain-api

Make a Typescript-Express Blockchain API for (personal learning project)
TypeScript
3
star
13

Rustlings

πŸ¦€ Small exercises to get you used to reading and writing Rust code!
Rust
3
star
14

Solidity-SimpleStorage

Learning solidity - SimpleStorage
JavaScript
2
star
15

matrix-rain

another matrix rain in the terminal
Python
2
star
16

portfolio-v3

Brand new personal portfolio! I made it as simple as possible so that it would be easy to maintain over time.
TypeScript
2
star
17

portfolio

My portfolio using Gatsby.js as front-end and Prismic as CMS
TypeScript
1
star
18

algo-trading

Discover both data analysis and algorithmic trading strategies
Jupyter Notebook
1
star
19

React-calculator

Learning project
JavaScript
1
star
20

game-of-life

A game-of-life implementation with Rust and WebAssembly.
Rust
1
star
21

tetris

Build a Tetris Game using HTML5 Canvas & React + Redux
TypeScript
1
star
22

kitten-challenge

React-native + Firebase app | WIP Project... abandoned
TypeScript
1
star
23

localhost

Customize your localhost home page
PHP
1
star
24

diesel_demo

Getting started making a CRUD with Diesel ORM and PostgreSQL, written in Rust
Rust
1
star
25

hello_grep

Simplified grep clone to learn Rust - from "The Book"
Rust
1
star
26

sportigoo

Sportigoo.fr WordPress website
PHP
1
star
27

term-history

CLI app that shows you which terminal programs you use most often.
Rust
1
star
28

data-sci-sandbox-example

Example of data-science project - could be used as a starter
Jupyter Notebook
1
star
29

telegram-rsi-bot

Send me the price and the Relative Strength Index (RSI) for some crypto assets, stocks and indexes
JavaScript
1
star
30

dotfiles

Personal linux config
Shell
1
star
31

juliencrn

juliencrn/juliencrn is a special repository. Its README.md will appear on your public profile!
1
star
32

chat

Simple chat application to learn backend dev using JavaScript.
TypeScript
1
star
33

test-deploy-node-app

Test how deploy and monitor nodejs bot using pm2
JavaScript
1
star
34

ifxtt-watcher

Tmp app to quickly deploy, copied pasted from ifxtt monorepo
TypeScript
1
star
35

npm-version-tests

Basic repo to understand how works git tag with npm version and automate theses using npm scripts
JavaScript
1
star
36

spacedicks-website

10,000 unique NTFs with proof of ownership living on the Polygon blockchain and following the ERC-721 standard, but yeah, these are DICKs.
TypeScript
1
star
37

lynxee

Rust based smart-contract for the #NFT Lynxee project on Elrond's network
Rust
1
star
38

rust-exercises

Learning repo with some basic exercises written in Rust
Rust
1
star
39

remind

[work in progress] Prototype of tool to help to learn languages.
Rust
1
star
40

voting-dapp

A basic voting dapp (decentralized application) written in Solidity & React.
JavaScript
1
star
41

mini-redis

Little project to learn how to build apps on top on Tokio, a Rust runtime.
Rust
1
star
42

gm-solana

Discover ASS stack (Anchor, Solana, Svelte)
Svelte
1
star
43

crossy-road

⚠️ Early abandoned - Does not work at all. Personal learning project to play with WebGL building crossy road game
JavaScript
1
star
44

twitter-clone

[Abandonned] A very simple version of the twitter api to learn how to create a REST API using Rust and the actix framework
Rust
1
star
45

elrond-crowdfunding

simple crowdfunding smart contract written in rust on the elrond blockchain following the official tutorial
Rust
1
star
46

rust-grpc-demo

Minimal example of a RPC server written in Rust.
Rust
1
star