onyxia-ui
usehooks-ts
onyxia-ui | usehooks-ts | |
---|---|---|
4 | 19 | |
34 | 5,651 | |
- | - | |
9.3 | 9.3 | |
4 days ago | 13 days ago | |
TypeScript | TypeScript | |
MIT License | 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.
onyxia-ui
-
The french government's design system
My advice if you don't have a multi-million budget and you only need to support React is to start from MUI components. Components like Date pickers, or Autocomplete are complex and time consuming to code from scratch. First thing you want to do is to build a custom theme for MUI (example DSFR, Example OnyxiaUI) this will make the MUI components roughly match your design system out of the box. Then you can create your own components that are wrapper around MUI components and customize them until they match your design (Example). Trust me, we always underestimate the complexity of building base component from scratch. There are tons of things to consider, I don't even mention the accessibility concerns... Customizing MUI components is the quick win route.
-
β¨ makeStyles is dead, long live makeStyles! β¨
Shameless plug of our design toolkit: onyxia-ui. But it's good!
-
"Make your website responsive" they said, but no mockups?
We are working on a UI toolkit that let you define what is the expected screen size. If you put 1920 for example and the screen is bigger than that it will stretch everything up. If the screen is smaller it shrinks everything down. It's not a perfect solution but it garanties that your app will look exactly the same no matter the screen size of your users. You can check it out here
-
tss-react will be promoted as the new makeStyles API in material-ui v5
Actually we are working on an alternative typescript first ui toolkit. tss-react is part of it. You can check it out it's onyxia-ui it rocks. It's still under active development but it's usable already. Also what's cool about it is that our salary are paid by the French tax payer so it's MIT, no strings attached.
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?
tss-react - β¨ Dynamic CSS-in-TS solution, based on Emotion
react-use - React Hooks β π
react-dsfr - π«π· Design system React toolkit
usehooks.ts - React hook library, ready to use, written in Typescript. [Moved to: https://github.com/juliencrn/usehooks-ts]
compodio - Putting the podcast in community radio
react-hooks-library - A collection of hooks and utilities for modern React
usehooks - A collection of modern, server-safe React hooks βΒ from the ui.dev team
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
react-use-hotjar - Adds Hotjar capabilities as custom hooks such as init, identify and stateChange
use-query-params - React Hook for managing state in URL query parameters with easy serialization.
react-use-wizard - π§ A React wizard (stepper) builder without the hassle, powered by hooks.