jotai
hookstate
Our great sponsors
jotai | hookstate | |
---|---|---|
107 | 16 | |
17,143 | 1,625 | |
2.6% | - | |
9.2 | 4.8 | |
5 days ago | 5 months 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.
jotai
-
React Server Components Example with Next.js
Daishi Kato, creator of Zustand and Jotai, says there are a few things we need to support RSC serialization:
- 5 Alternatives to Redux for React State Management
-
jotai-wrapper, a super tiny and simple utility library
I've just published jotai-wrapper, a super tiny and simple utility library that makes using jotai even simpler. It comes from the necessity to migrate a project with react-context-slices to jotai. Both libraries share a similar API. While in react-context-slices you have the useSlice hook, in jotai you have the useAtom, useSetAtom, and useAtomValue hooks. In react-context-slices you define either React Context or Redux slices, while in jotai you define atoms. The need for the migration from the first to the second was a high memory usage by react-context-slices when using React Context slices.
-
React State Management in 2024
Atom-based: splits states into tiny pieces of data called atoms, which can be written to and read from using React hooks. In this group, we have Recoil and Jotai.
-
React Basics: Essential Knowledge for Every React Developer
jotai Is the signal based state manager I recommended, offering the best developer experience (in my opinion) as it eliminates the necessity to define and update a global store
-
π Dominate React Project Startups: Insider Tips for Dev Success! π€
Jotai π§ββοΈ
- Jotai β Primitive and flexible state management for React
-
Thoughts on Signals?
Atomic libs include Recoil, Jotai, and the one I maintain: Zedux. Zedux especially was designed to work well with sockets and RxJS observables and has been getting some traction recently, so of course I recommend checking it out. Feel free to hmu with any questions.
-
New Project: What is a good framework for a website?
Global State Machine: Jotai (great for any state that needs to be stored globally for your application)
- Is there a state management library, similar to Redux or Zustand, that automatically generates setters for the state you define?
hookstate
-
A Comprehensive Guide to React State Management
Hookstate
-
ReactJS Good Practices
Avoid using complex state structures to make it easier to manage and debug. There are multiple libraries to help manage complex state management such as Redux, Hookstate, etc.
-
What is React State Management?
Link: https://hookstate.js.org/
- 2022: Best State management libraries in React JS
-
The new wave of React state management
As you stumble on this post and article, do check out one library not mentioned in this list: hookstate. I'm a big fan, the API is very simple and it offers lots of extendability options.
-
As a beginner which is better Redux or useContext() API?
Why don't you try out hook state
-
Redattolo, un gioco per ββββββββ in React (Next.js)
Lo stack tecnologico Γ¨ abbastanza standard per il 2022: il core Γ¨ Next.js (quindi React, 18), di store managemente se ne occupa Hookstate e per un po' di collante in piΓΉ c'Γ¨ l'event emitter / pubsub Mitt.
-
React state management libraries in 2022
I have been using Hookstate, curiously aanbidt never mentioned in lists like this.
-
What's best practice for managing state without Redux?
I've never understood why Hookstate (https://hookstate.js.org/) doesn't get more love. It's super-simple (no boilerplate), modern (hook-based), performant (works great for all size apps) and even works outside of components beautifully. It's somewhat similar to context, but more robust and feature-rich (because it's a true state management solution, which context really isn't meant to be). It's basically the only way I've done state in React for a couple of years now and I wouldn't trade it for the world.
-
Noob question, Nextjs vs CRA?
If your data requirements aren't particularly mutating / don't mutate regularly then the newer context api would be your friend it essentially variable that is scoped to your react tree which components can subscribe to changes of, but it is important to know that: unfortunately the current useContext hook (and by extension the rest of the context api) doesn't have any means of specifically "choosing" / "selecting" a part of that context state which is where it falls behind redux etc... - even though they technically operate very very similarly - both redux and context api make use of "subscriptions" to track state updates, just that the context api was designed as a means of "dependency injection" whereas redux was designed for managing state across an entire application. Passing data through props is practically the same, as before the hooks api - avoid prop drilling etc... if you're simply looking at avoiding prop-drilling and just passing some stateful value to another component thats deeply nested then context is your friend - as for redux, I personally am further inclined to hookstate as I think their api is really strong.
What are some alternatives?
zustand - π» Bear necessities for state management in React
redux-toolkit - The official, opinionated, batteries-included toolset for efficient Redux development
Recoil - Recoil is an experimental state management library for React apps. It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.
react-hook-form - π React Hooks for form state management and validation (Web + React Native)
signals - Manage state with style in every framework
unstated-next - 200 bytes to never think about React state management libraries ever again
react-query - π€ Powerful asynchronous state management, server-state utilities and data fetching for TS/JS, React, Solid, Svelte and Vue. [Moved to: https://github.com/TanStack/query]
particule - Fine-grained atomic React state management library
valtio - π Valtio makes proxy-state simple for React and Vanilla