react-use
usehooks-ts
Our great sponsors
react-use | usehooks-ts | |
---|---|---|
58 | 19 | |
40,251 | 5,570 | |
- | - | |
6.4 | 9.3 | |
17 days ago | 12 days ago | |
TypeScript | TypeScript | |
The Unlicense | 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.
react-use
-
Ultimate Guide & Resources to Enhancing Your ReactJS Skills || 16 GitHub repositories
Discover a collection of custom React hooks for supercharging your app's functionality.
- small and efficient useBreakpoints hook
-
UseHooks โ A Collection of Server Component Safe React Hooks
How do these compare with the current heavyweight library?
-
This package simplifies async data handling in your React apps
What's the benefit over useAsync and friends?
-
Manipulating nested objects inside state
try this one: https://github.com/streamich/react-use/blob/master/docs/useSetState.md
-
5 Great Custom Hooks For Your React Project
One use case for the useWindowSize hook, which belongs to react-use, is for responsive design. The useWindowSize hook keeps track of the size of the browser window which makes it possible to apply different styles (layouts, displays, etc.) to user interfaces at different sizes. It returns an object containing the current width and height of the window.
-
7 Really Helpful GitHub Repositories for React Developers๐๐ฏ
Link: https://github.com/streamich/react-use
-
16 Github Repos to master React
10-) Sometimes when hooks are not enough for you, you may feel the need to write Custom Hooks. A great Custom Hook List that will make your job easier react-use beautiful-react-hooks
-
UseContext React: Data doesn't transfer from Login component to SideBar component
What you are looking for can be achieved a few ways. React-use has global context hook that is pretty handy but I prefer to store the data in my db, then fetch the data into your sidebar component. React-use
-
React-use (React Hooks)
React-use is the package that provides many useful react hooks that we can use to build the UI more efficiently. It provides the hooks related sensors, ui, animations, side-effects, lifecycles, state and etc.
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.
-
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?
rooks - Essential React custom hooks โ to super charge your components!
react-hooks-library - A collection of hooks and utilities for modern React
milkdown - ๐ผ Plugin driven WYSIWYG markdown editor framework.
usehooks.ts - React hook library, ready to use, written in Typescript. [Moved to: https://github.com/juliencrn/usehooks-ts]
JSDoc - An API documentation generator for JavaScript.
usehooks - A collection of modern, server-safe React hooks โย from the ui.dev team
react-helmet - A document head manager for React
mui-modal-provider - ๐ Context API and Hooks based Modal Provider for react material-ui framework
joystick - A full-stack JavaScript framework for building stable, easy-to-maintain apps and websites.
react-local-storage - A stateful react hook for browser storage
SvelteKit - web development, streamlined
react-use-hotjar - Adds Hotjar capabilities as custom hooks such as init, identify and stateChange