use-media
constate
Our great sponsors
use-media | constate | |
---|---|---|
4 | 4 | |
517 | 3,911 | |
- | - | |
8.6 | 3.6 | |
12 days ago | about 2 years 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.
use-media
-
Proper way to do not render an element in React on different tailwind's breakpoints
not react, but i did something similar in svelte: https://github.com/afreidz/t9r/blob/bca2a25c031204b107e5b7013b4306ac961b2420/frontend/src/lib/theme.ts#L3 the key being resolveConfig ... i used this lib on a react project to add those TW values into a hook for conditional rendering: https://github.com/streamich/use-media
-
Top 10 Awesome React Hooks Libraries
Github
-
Awesome Things Related To React Hooks 😍
use-media - useMedia React hook to track CSS media query state
-
Top 10 React Hooks Library
Have you ever faced the issue of managing CSS media query? useMedia hook simplified this problem in a line of code. It's a sensory hook which tracks the state of CSS media query and helps you to design & develop responsiveness apps.
constate
-
What are your favorite small utility packages?
Another one I like is https://github.com/diegohaz/constate, also <100 lines, but it makes contexts much easier to use. FB also uses mostly contexts for state management.
-
Top 10 Awesome React Hooks Libraries
Github
-
Awesome Things Related To React Hooks 😍
constate - React Context + State
-
Top 10 React Hooks Library
Constate hook provides lifting local state to React Context Level. So you can access/update state variables anywhere in the application with few lines of code. This is useful when you use the same state in multiple components. For example, you have Themes, Colors, Fonts used in multiple components, Users are allowed to change at one place and it should be reflected in the whole application. Package written in TypeScript and very compact.
What are some alternatives?
local-storage - React hook which syncs localStorage[key] with the comp.
react-useportal - 🌀 React hook for Portals
use-http - 🐶 React hook for making isomorphic http requests
react-recipes - 👩🍳 A list of React Hooks utility library containing popular customized hooks
react-chartjs-2 - React components for Chart.js, the most popular charting library
react-notion-x - Fast and accurate React renderer for Notion. TS batteries included. ⚡️
antd - An enterprise-class UI design language and React UI library
use-query-params - React Hook for managing state in URL query parameters with easy serialization.
chakra-ui - ⚡️ Simple, Modular & Accessible UI Components for your React Applications
react-hot-toast.com - Smoking Hot React Notifications 🔥
state - 🚀 Tiny and powerful React hook-based state management library.