awesome-react-hooks
usehooks-ts
Our great sponsors
awesome-react-hooks | usehooks-ts | |
---|---|---|
8 | 19 | |
9,656 | 5,651 | |
0.9% | - | |
0.0 | 9.3 | |
9 months ago | 8 days ago | |
TypeScript | ||
Creative Commons Zero v1.0 Universal | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
awesome-react-hooks
- What is your favorite react hook?
-
Does react have something equivalent to vue composables?
Sure here's the docs for custom hooks. And here are many examples of custom hooks for data fetching/storing/syncing, theme switching, resize, etc. Basically it abstracts away the how and just gives you the data. awesome hooks
-
Top 10 Awesome React Hooks Libraries
awesome-react-hooks A curated resource of react hooks
-
There are a lot of hooks! Do I need to master them all to get a job as a front end? Or just some of them would be enough?
Just the built-in ones are mandatory. The custom hooks are used when u need it. Here is a list of custom hooks if u ever need to use one. Hooks
-
Common React Design patterns: Custom Hooks
react-use * βοΈ 29.6k / π½ 958k ahooks * βοΈ 9.1k / π½ 74k awesome-react-hooks * βοΈ 8.1k / π½ 74k usehooks-ts * βοΈ 1.6k / π½ 44k react-recipes * βοΈ 850 / π½ 1.2k react-hanger * βοΈ 1.8k / π½ 3.3k
-
Awesome React Resources
Awesome React Hooks
-
Awesome Things Related To React Hooks π
General
-
What are the current best practices in ReactJS? Haven't updated since 2018
- You can make custom hooks to help abstract stateful logic out of components into re-usable chunks based on your needs several incredible examples out there, but take a look at this collection of links: rehooks/awesome-react-hooks: Awesome React Hooks (github.com)
usehooks-ts
- React hook library, ready to use, written in TypeScript
- Explorando a lib usehooks-ts para Desenvolvimento no React
-
rooks VS usehooks-ts - a user suggested alternative
2 projects | 1 Sep 2023
-
A simple theme switcher in React for Tailwind CSS
These depedencies provide unstyled accessible components from headless ui, icons from heroicons and common hooks with typescript support.
-
News IQ - a daily news quiz - built with React, Local Storage, Anonymous Auth, and Framer Motion
π‘ Local Storage - All score history, streaks, and user info is saved in Local Storage! Check out `useLocalStorage` by https://usehooks-ts.com/. A great resource and helpful when you want to quickly manage it like any other state.
-
How to TRULY persist component state using a custom hook - useQueryParam
We will store last search query string in local storage, thus I will summon useLocalStorage from usehooks-ts:
-
Is it correct to use useRef in my useCurrentSection hook?
There are tons of examples of people building hooks for IntersectionObserver, they are probably a good deal more complex than what you want but you can learn a lot from how they do it and then simplify it to your needs, here is one: https://github.com/juliencrn/usehooks-ts/blob/master/src/useIntersectionObserver/useIntersectionObserver.ts
-
React.dev
Take a look at Use hooks libraries for examples of code that you may want to have portability with (this is they typescript one because its the one I've used)
One of the simplest examples is "useToggle" which just sets a state variable to true or false. Not hard to write in a class component but it's still stuff that you may end up writing a lot.
A lot of similar ones are click and event handlers that need to be cleaned up after the component is unmounted.
useIsMounted is one I use a lot too to ensure I'm not trying to write state on an API callback once a component is unmounted.
You could add each of these to a class with an hoc and end up with withToggle(withIsMounted(withUseMediaEvent(MyComponent))) but that tends to be a bit of a mess.
https://usehooks-ts.com/
-
5 Great Custom Hooks For Your React Project
This implementation of the useCopyToClipboard hook comes from the usehooks-ts library. It provides an easy way to copy text to the clipboard. Other React hooks libraries also have this hook which they implement differently: some rely on JavaScript libraries like copy-to-clipboard that run on document.execCommand() while others like this one depend on the clipboard API.
-
7 great libraries for React
1: usehooks-ts
What are some alternatives?
SweetAlert - A beautiful replacement for JavaScript's "alert"
react-use - React Hooks β π
reactjs-interview-questions - List of top 500 ReactJS Interview Questions & Answers....Coding exercise questions are coming soon!!
usehooks.ts - React hook library, ready to use, written in Typescript. [Moved to: https://github.com/juliencrn/usehooks-ts]
jsx-ast-utils - AST utility module for statically analyzing JSX
react-hooks-library - A collection of hooks and utilities for modern React
react-chartjs-2 - React components for Chart.js, the most popular charting library
usehooks - A collection of modern, server-safe React hooks βΒ from the ui.dev team
razzle - β¨ Create server-rendered universal JavaScript applications with no configuration
mui-modal-provider - π Context API and Hooks based Modal Provider for react material-ui framework
react-local-storage - A stateful react hook for browser storage