Awesome React Hooks Resources
- π React Hooks Docs
?β
?π΄
React Hooks RFC)
- π "Making Sense of React Hooks" by Dan Abramov
- π "From React.Component to hooks" by Octave Raimbault
- π "React Hooks: Whatβs going to happen to my tests?" by Kent C. Dodds
- π "State Management with React Hooks - No Redux or Context API" by AndrΓ© Gardi
- π "How to Fetch Data with React Hooks?" by Robin Wieruch
- π Primer on React Hooks
- π React Hooks - A deeper dive featuring useContext and useReducer
- π "Using Custom React Hooks to Simplify Forms" by James King
- π Testing of a Custom React Hook for Fetching Data with Axios
- π The Guide to Learning React Hooks (Examples & Tutorials) by Eric Bishard
- π "Sanely Testing React Hooks" by Dave Cooper
- π React by Example: Hooks
- π π¬ ReactConf 2018: React Today and Tomorrow by Sophie Alpert and Dan Abramov Official announcement and first demo.
- π π¬ ReactConf 2018: 90% Cleaner React by Ryan Florence
- π π¬ React Hooks: A Complete Introduction by Harry Wolff
- π π¬ React Hooks playlist by Ben Awad
- π π¬ React Hooks playlist by Josh Ribakoff
- π π¬ React Hooks playlist by Michael Chan
- π π¬ Custom Hooks in React by Tanner Linsley
- π React Hooks - Syntax (Nov 14th, 2018)
- π React Hooks 1 Year Later - Syntax (Mar 18, 2020)
- π Why should I use React Hooks? - Syntax (Dec 7th, 2020)
- π
eslint-plugin-react-hooks
- π
hooks.macro
Babel Macros for automatic memoization invalidation - π CodeSandbox Starter Kit
- π React Hooks Snippets for VS Code
47β
0π΄
hook-into-props
) Helper to build HOCs using hooks. Useful for using hooks with class components.189β
3π΄
react-universal-hooks
) React Universal Hooks: just use****** everywhere, Functional or Class Components84β
8π΄
Jooks) Unit-test your custom hooks by mocking React's Hooks API (useState, etc.)- π
react-hooks-testing-library
Library to create unit tests for custom React hooks.
1933β
94π΄
@react-hookz/web) - A library of general-purpose React hooks built with care and SSR compatibility in mind.14108β
2722π΄
ahooks) A collection of React Hooks specifically aiming at enterprise applications.- π beautiful-react-hooks(π₯) A collection of hooks to speed-up your components and custom hooks development.
363β
38π΄
Captain hook) Modest list of hooks.215β
8π΄
crooks) A collection of unique React Hooks.137β
14π΄
hooks-by-example) Collection of beginner-friendly real world examples of hook usage.- π Hooks.guide Collection of React hooks curated by the community.
1033β
68π΄
react-recipes) π©βπ³ Collection of essential hook recipes π₯- π Searchable Collection of React Hooks
499β
43π΄
Sunflower(π»)) Collection of React Hooks returning components of antd.- π useHooks(π ) One new React Hook recipe every day.
- π Use Hooks A collection of reusable React Hooks.
56β
7π΄
@21kb/react-hooks
) A set of React Hooks to get hooked on.19β
1π΄
@d2k/react-devto
) React hook for Dev.to API requests10β
2π΄
@d2k/react-github
) React hook for Github API requests12β
2π΄
@d2k/react-localstorage
) React hook that handles updating and clearing localstorage values while keeping them in sync with your components.220β
28π΄
@elgorditosalsero/react-gtm-hook
) React hook for handle easily the Google Tag Manager.1659β
109π΄
@hookstate/core
) Modern, very fast and extendable state management for React.11β
1π΄
@jzone/react-request-hook
) πΆReact hook for custom requestοΌcompatible with various lib, support redux?β
?π΄
@kevinwolf/formal
) Elegant form management primitives for the react hooks era.2976β
101π΄
@koale/useworker
) βοΈ Running heavy task in background using web workers, without blocking the UI6β
0π΄
@marvelsq/use-properties-hook
) Instance functions inside FunctionComponent likeclass-properties
and equal inShallowCompare
239β
23π΄
@rehooks/component-size
) React hook for determining the size of a component.60β
8π΄
@rehooks/document-title
) React hook for updating the document-title.31β
3π΄
@rehooks/document-visibility
) React hook for subscribing to document visibility.113β
7π΄
@rehooks/input-value
) React hook for creating input values.576β
48π΄
@rehooks/local-storage
) React hook which syncslocalStorage[key]
with the comp.66β
3π΄
@rehooks/network-status
) React hook for getting network-status.123β
11π΄
@rehooks/online-status
) React Hook for Online status.82β
13π΄
@rehooks/window-scroll-position
) React hook for getting windowx
andy
position.131β
20π΄
@rehooks/window-size
) React hook for subscribing to window size.21β
3π΄
@rekindle/use-request
) π€ React hook for making request.17β
1π΄
@rkrupinski/use-state-machine
) A finite state machine hook.334β
11π΄
@staltz/use-profunctor-state
) React Hook for state management with Profunctor Optics34β
9π΄
@webscopeio/react-health-check
) π₯ Lightweight React hook for checking health of API services.1278β
28π΄
@wellyshen/use-web-animations
) πΏ React hook for highly-performant and manipulable animations using Web Animations API.59β
14π΄
@withvoid/melting-pot
) React hook utility library.46β
6π΄
ahooks/usetable
) A Progressive Solution for Query Table Scene.1346β
70π΄
concent
) State management that tailored for react, it is simple, predictable, progressive and efficient.3931β
91π΄
constate
) Transform your local state into global state usinguseContextState
anduseContextReducer
.9β
0π΄
conuse
) Share Hook with Context5033β
190π΄
easy-peasy
) Easy peasy global state for React.492β
25π΄
fetch-suspense
) React hook for the Fetch API with support for Suspense.1882β
90π΄
graphql-hooks
) Minimal hooks-first GraphQL client.2130β
90π΄
mobx-react-lite
) Lightweight React bindings for MobX based on experimental React hooks.214β
21π΄
modali
) A delightful modal dialog component for React, built from the ground up to support React Hooks.8β
1π΄
moment-hooks
) A library containing generic react hooks47β
7π΄
nice-hooks
) πΉ A lot of nice hooks to make react hooks easier to use ( useState callback / life cycle / instance variable)53β
2π΄
promise-hook
) React hook for simplifying Promise based data fetching.504β
11π΄
reactive-react-redux
) React Redux binding with React Hooks and Proxy1186β
45π΄
react-async-hook
) React hook to fetch ad-hoc data into your React components.10β
0π΄
react-cached-callback
) React hooks for caching many callbacks by key, for example, in loops.21β
3π΄
react-context-refs
) React hooks for getting refs of elements via context.159β
18π΄
react-cookie
) React hooks for universal cookies.941β
20π΄
react-cool-dimensions
) π React hook to measure an element's size and handle responsive components.248β
10π΄
react-cool-form
) π React hooks for forms state and validation, less code more performant.547β
13π΄
react-cool-inview
) π₯οΈ React hook to monitor an element enters or leaves the viewport (or another element).547β
13π΄
react-cool-onclickoutside
) π± React hook to listen for clicks outside of the component(s).737β
23π΄
react-cool-portal
) π React hook for Portals, which renders modals, dropdowns, tooltips etc. to or else.1214β
39π΄
react-cool-virtual
) β»οΈ A tiny React hook for rendering large datasets like a breeze.78β
20π΄
react-countdown-hook
) Dead simple yet powerful countdown hook for React. Powered byrequestAnimationFrame
.277β
21π΄
react-darkreader
) π A React Hook for adding a dark / night mode to your site inspired by darkreader.0β
0π΄
react-declare-form
) React hook based declarative form library.4β
1π΄
react-deep-hooks
) React hooks for non-primitive dependencies.?β
?π΄
react-dom-status-hook
) React hook for subscribing to theDOMContentLoaded
event.70β
7π΄
react-enhanced-reducer-hook
) An alternative touseReducer
that accepts middlewares.349β
20π΄
react-fetch-hook
) React hook for conveniently use Fetch API.3603β
306π΄
react-firebase-hooks
) A collection of hooks for use with π Firebase.2β
0π΄
react-form-stateful
) Form library. Exposes dispatch to allow for the library to be extended through side effects.1935β
74π΄
react-hanger
) A small collection of utility hooks.121β
9π΄
react-hook-mighty-mouse
) React hook that tracks mouse events on selected element π- π
react-hook-mousetrap
A hook to trigger callbacks on keys or keys combos, powered by mousetrap. 88β
6π΄
react-hookedup
) A collection of useful React hooks.41738β
2089π΄
react-hook-form
) Form validation without the hassle.18β
1π΄
react-hook-layout
) Layout management in React.495β
27π΄
react-hooks-async
) React custom hooks for async functions with abortability and composability1100β
62π΄
react-hooks-global-state
) A simple global state management.19β
2π΄
react-hooks-image-size
) Hook to get natural image size from url.545β
27π΄
react-hooks-lib
) A set of reusable react hooks.200β
11π΄
react-hooks-svgdrawing
) A hooks to svg drawing.171β
21π΄
react-hooks-use-modal
) A hook to open the modal easily.29β
0π΄
react-hooks-visible
) A hook to element visibility. Uses the intersection observer API.712β
17π΄
react-hooks-worker
) React custom hooks for web workers2743β
117π΄
react-hotkey-hook
) React hook for hotkeys.- π
react-i18next
Internationalization for react done right. 45β
2π΄
react-immer-hooks
) useState and useReducer using Immer to update state.6β
1π΄
react-indicative-hooks
) Hooks wrapping a data validation library called Indicative49β
4π΄
react-intersection-visible-hook
) React hook to track the visibility of a functional component.61β
8π΄
react-media-hook
) React hook for Media Queries.40β
9π΄
react-metatags-hook
) React Hook to manage html meta tags.270β
21π΄
react-native-react-bridge
) A React Native plugin to run React and handle communication between them.23β
0π΄
react-optimistic-ui-hook
) βοΈ Minimal "optimistic UI" pattern implementation with a React hook4β
2π΄
react-page-name
) React Hook for managing the page title.20β
1π΄
react-peer-data
) React wrapper for PeerData library for files, media streaming/sharing using WebRTC.52β
6π΄
react-pirate
) React lifecycle and utilities hooks.100β
8π΄
react-powerhooks
) Hooks api for react-powerplug components.9β
1π΄
react-promiseful
) A React component and hook to render children conditionally based on a promise status.42750β
2924π΄
react-query
) Hooks for fetching, caching and updating asynchronous data in React.26β
7π΄
react-recaptcha-hook
) React hook for google-recaptcha v31033β
68π΄
react-recipes
) π©βπ³ Collection of essential hook recipes π₯113β
6π΄
react-request-hook
) Managed, cancelable and safe-oriented api requests.7042β
298π΄
react-responsive
) React media query module.6β
4π΄
react-rocketjump
) Manage state and side effects like a breeze.71β
2π΄
react-screen-wake-lock
) React implementation of the Screen Wake Lock API. It provides a way to prevent devices from dimming or locking the screen when an application needs to keep running127β
21π΄
react-script-hook
) React hook to dynamically load an external script and know when its loaded85β
0π΄
react-selector-hooks
) Collection of hook-based memoized selector factories for declarations outside of render.238β
64π΄
react-speech-kit
) Hooks for browser Speech Recognition and Speech Synthesis.16β
2π΄
react-state-patterns
) Utility package for creating reusable implementations of React state provider patterns from hooks.2021β
147π΄
react-swipeable
) React swipe event handler hook.2744β
72π΄
react-tracked
) Simple and fast global state with React Context. Eliminate unnecessary re-renders without hassle.6β
2π΄
react-uniformed
) π Declarative React forms using hooks.63β
5π΄
react-use-api
) Async HTTP request data for axios. Designed for diverse UI states, SSR and data pre-caching.5β
0π΄
react-use-browser
) A hook enabling client side hydration of Server-Side-Rendered components when server-produced markup needs to differ from the final client application markup.56β
1π΄
react-use-calendar
) A hook for implementing a calendar with events.265β
15π΄
react-use-clipboard
) A hook that copies text to a user's clipboard.7β
0π΄
react-use-d3
) A React hook to use D3.23β
2π΄
react-use-data-loader
) React hook for loading data3β
1π΄
react-use-fetch-factory
) React hook that takes care of fetching and selecting data with redux.?β
?π΄
react-use-fetch-with-redux
) React hook that caches API requests that works with redux.937β
55π΄
react-use-form-state
) React hook for managing form and inputs state.5β
2π΄
react-use-id-hook
) React hook for generating SSR-safe unique id strings.44β
6π΄
react-use-idb
) React hook for storing value in the browser usingindexDB
.16β
2π΄
react-use-infinite-loader
) βΎοΈ π β³ Super lightweight infinite loading (scroll) hook for React apps6β
0π΄
react-use-input
) π£ A hook whose setter can be directly given to HTML inputs15β
0π΄
react-use-lazy-load-image
) π β‘ Add image lazy loading to your React app with ease10β
1π΄
react-use-message-bar
) A simple React hook for message bars.21β
8π΄
react-use-modal
) React hook for manage modal.20β
0π΄
react-use-path
) The tiniest hook style react router.46β
4π΄
react-use-scroll-position
) React hook for using the scroll position.26β
1π΄
react-use-trigger
) React hook for trigger effect from any place of code3β
0π΄
react-use-watch
) A React hook about triggers once only when dependencies have changed.5β
1π΄
react-use-wavelet
) React hooks for connecting to the Wavelet smart-contract platform42013β
3163π΄
react-use
) Collection of essential hooks.50β
3π΄
react-useFormless
) React hook to handle forms state.19β
2π΄
react-usemiddleware
) React hook for using existing Redux middlewares (like thunk or saga) withuseReducer
.891β
34π΄
react-useportal
) π usePortal, React hook for Portals22β
3π΄
react-user-media
) React wrapper fornavigator.getUserMedia
.306β
30π΄
react-wait
) Complex Loader Management Hook for React Applications.93β
3π΄
react-window-communication-hook
) React hook to communicate among browser contexts (tabs, windows, iframes).152β
11π΄
react-with-hooks
) Ponyfill for the proposed React Hooks API.?β
?π΄
reaktion
) useState like hook for global state management.145β
11π΄
redhooks
) Global state management with React Hooks. It also supports the use of middleware like redux-thunk or redux-saga or your own custom middleware.38β
2π΄
redux-react-hook
) React hook for accessing mapped state from a Redux store.115β
5π΄
region-core
) A global state management framework with a hookuseProps
.13β
0π΄
rehooks-visibility-sensor
) It checks whether an element has scrolled into view or not.18β
1π΄
resynced
) Multiple state management using React Hooks API.- π
reto
Flexible and efficient React store with hooks. 14β
0π΄
rrh
) Super Simple React Hooks for react-redux.2185β
83π΄
rxjs-hooks
) An easy way to use RxJS v6+ with react hooks.142β
8π΄
scroll-data-hook
) Returns information about scroll speed, distance, direction and more.14β
1π΄
style-hook
) π¨ wirte css in js with react hooks.30636β
1222π΄
swr
) React Hooks library for remote data fetching.4400β
118π΄
the-platform
) Browser API's turned into React Hooks and Suspense-friendly React elements for common situations.302β
6π΄
trousers
) π A hooks-first CSS-in-JS library, focused on semantics and runtime performance159β
6π΄
use-abortable-fetch
) React hook that does a fetch and aborts when the components is unloaded or a different request is made.15β
1π΄
use-action
) Almost same to useEffect, but not deferred.65β
1π΄
use-as-bind
) React hook for using as-bind with a WASM source.143β
9π΄
use-async-memo
) React hook for generating async memoized data.7β
0π΄
use-autocomplete
) A React hook for returning autocomplete values for a search string within an array.32β
9π΄
use-axios-react
) React CRUD hooks for axios, comprehensive list of examples11β
0π΄
use-boolean
) Convenient helpers for handling boolean state.3β
1π΄
use-browser-history
) A React hook to handle browser history events.31β
7π΄
use-cart
) A React hook that gives you shopping cart functionality.78β
2π΄
use-click-away
) React hook when you want a callback invoked when a DOM element was not clicked.180β
11π΄
use-clippy
) A React hook to reading from and writing to the user's clipboard.2699β
61π΄
use-context-selector
) React useContextSelector hook in userland.3β
0π΄
use-controlled-input-number
) React hook to turn numeric input behavior into pretty much what you expect.25β
2π΄
use-countries
) Custom react hook to list countries and languages.3023β
113π΄
use-debounce
) A debounce (and throttle) hook for React.237β
6π΄
use-deep-compare
) It's react's useEffect/useMemo/useCallback hooks, except using deep comparison on the inputs.1883β
84π΄
use-deep-compare-effect
) π It's react's useEffect hook, except using deep comparison on the inputs, not reference equality.59β
2π΄
use-detect-print
) React hook to detect when a page is being printed.32β
3π΄
use-dimensions
) React Native hook for getting screen and window dimensions.19β
1π΄
use-double-click
) React hook for continuous double-clicks and combining click and double-click events57β
7π΄
use-eazy-auth
) React hooks for handle auth stuff.492β
16π΄
use-events
) A set of React Hooks to handle mouse events.183β
11π΄
use-force-update
) React hook for forcing re-render of a functional Component.18β
2π΄
use-hotkeys
) HotKeys.js React Hook that listen to keydown and keyup keyboard events, defining and dispatching keyboard shortcuts.13β
0π΄
use-hovering
) Simple, accessible React hook for tracking hover state.2314β
114π΄
use-http
) πΆ useFetch, React hook for making isomorphic http requests.4102β
96π΄
use-immer
) A hook to use27786β
852π΄
immer) to manipulate state.3β
0π΄
use-input-file
) React hook for creating input file.44β
5π΄
use-is-mounted-ref
)useIsMountedRef
is a React Hook to check when the component is mounted.1β
1π΄
use-lang-direction
) A hook that reads the HTML element'sdir
attribute value and any updates to that value allowing you to update your UI accordingly.124β
11π΄
use-last-fm
) A hook to show your current playing song from Spotify or any other site π last.fm supports in realtime. βͺ275β
20π΄
use-lilius
) A headless calendar hook for React.522β
24π΄
use-media
) CSS media queries with React hook.23β
3π΄
use-mouse-action
) React Hooks to listen to both mouse down or up and click events with a once called function.8β
1π΄
use-multiselect
) Manage multiselect state.29β
5π΄
use-overflow
) A React Hook that allows you to detect X and Y overflow1258β
65π΄
use-places-autocomplete
) π React hook for Google Maps Places Autocomplete.37β
10π΄
use-popper
) React hook wrapper around Popper.js.2171β
96π΄
use-query-params
) A React Hook for managing state in URL query parameters with easy serialization.80β
4π΄
use-react-modal
) πΌ useModal, React hook for Modals/Dialogs/Lightboxes567β
30π΄
use-react-router
) React Hook for pub-sub behavior using React Router.13β
0π΄
use-reactive-state
)useReactiveState()
- a reactive alternative to React'suseState()
.178β
9π΄
use-reducer-async
) React useReducer with async actions62β
4π΄
use-redux
) A hook to bind π redux.?β
?π΄
use-scroller
) React hook that automatically adds the next page, saving users from a full page load.109β
4π΄
use-scroll-to-bottom
) React hook for detecting when an element was scrolled to bottom.30β
1π΄
use-simple-undo
) Simple implementation of undo/redo functionality.197β
26π΄
server-push-hooks
) π₯ React hooks for π socket.io, π SEE and more to come51β
10π΄
use-socket.io-client
) React hook for socket.io-client, manipulate π socket.io client without any side effect.140β
10π΄
use-sse
) β¨useSSE - use Server-Side Effect.useEffect
both on client and server side.261β
7π΄
use-ssr
) β―οΈ React hook to determine if you are on the server, browser, or react native.11β
2π΄
use-state-snapshots
) A React hook to keep track of state changes for undo/redo functionality.99β
1π΄
use-substate
) React hook for subscribing to your single app state (works with your current π Redux app).17β
0π΄
use-suspender
) Execute asynchronous actions with πReact.Suspense
44β
2π΄
use-t
) Multi-language using hooks.397β
23π΄
use-undo
) React hook to implement Undo and Redo functionality.11β
1π΄
use-videocard
) React hook to fetch the graphics card information of the client using canvas1β
0π΄
use-window-blur-change-title
) React Hook for set the page title when the user is shifting focus away from the current window.1289β
98π΄
useDarkMode
) A custom React Hook to help you implement a "dark mode" component.3β
0π΄
useDeferredState
) A React hook for deferring state change. That's essential when your UI needs to wait for disappearing animation is complete to unmount component.5β
0π΄
useDropZone
) React hook that allows you to set simple drag and drop functionality.37β
4π΄
useEmailAutocomplete
) π¬ React hook for email autocomplete inputs.6β
2π΄
useFileDialog
) Open file dialog without struggling with file input using useFileDialog react hook5103β
186π΄
useInView
) React implementation of the Intersection Observer API to tell you when an element enters or leaves the viewport.9β
1π΄
useIsTyping
) Hook to see if the user is typing within a textarea or input24β
2π΄
useKeyCapture
) β¨οΈ A simple hook to make keyDown listening event easier.23β
4π΄
usePosition
) React hook to get position top left of an element.?β
?π΄
useReducerWithEffects
) React Hook that colocates reducer and side effects0β
0π΄
useReducerWithLocalStorage
) React hook that adds local storage support to theuseReducer
hook15β
1π΄
useScreenType
) Determining screen size type for Bootstrap 4 grid.12β
8π΄
useScreenType
) React hook to dynamically get current screen type (mobile, tablet, desktop) with configurable breakpoint support.319β
18π΄
useScrollSpy
) React hook to automatically update navigation based on scroll position.15β
6π΄
useServiceWorker
) A React hook which can register a service worker2β
0π΄
useValueAfter
) Very simple React hook to easily provide different props to a component (comes in handy for testing edge cases)2β
0π΄
useWaitForElements
) A simple hook to wait for elements to be rendered with MutationObserver.5β
1π΄
useWindowOrientation
) A hook returning the window's orientation (portrait vs. landscape) based off of current window dimensions7β
1π΄
useWindowWidthBreakpoints
) A hook for using (Bootstrap-inspired) window width breakpoints
9907β
774π΄
rehooks/awesome-react-hooks)