redux
zustand
Our great sponsors
- Klotho - AWS Cloud-aware infrastructure-from-code toolbox [NEW]
- Appwrite - The Open Source Firebase alternative introduces iOS support
- Sonar - Write Clean JavaScript Code. Always.
- ONLYOFFICE ONLYOFFICE Docs — document collaboration in your environment
- InfluxDB - Access the most powerful time series database as a service
redux | zustand | |
---|---|---|
240 | 212 | |
59,619 | 31,346 | |
0.3% | 6.6% | |
9.5 | 9.5 | |
1 day ago | 5 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.
redux
-
Exploring Web Rendering: Isomorphic JavaScript & Hydration
Because the application is shared between server and browser, state is as well. If your app has a single source of state as is often the case with Redux, for example, sharing state between server and browser can be as simple as passing your state object through JSON.stringify() then adding it to a
-
Mastering React Interview: Top Common Questions and Best Practices
Redux Documentation: The official Redux documentation covers everything you need to know about using Redux with React.
-
Revolutionize Your Next.js State Management with React Button OnClick and Apollo Set Up
Next.js documentation on data fetching and state Next.js documentation on server components Redux documentation Next.js Redux Wrapper documentation
-
Learning redux
You should start with http://redux.js.org/ and learn basics such as actions, reducer, state
-
Revolutionize Your React App with Redux: A Beginner's Guide to Simplifying State Management(PART 2)
Redux documentation:
-
How To Scale Your React Applications
Use a centralized state management solution As your React application grows, it becomes difficult to manage state across multiple components. One way to solve this problem is by using a centralized state management solution such as Redux or MobX. Redux is a popular library for managing application state in React. It provides a single store that holds the entire state of the application, and a set of rules for how the state can be updated. With Redux, you can easily share state between components and manage complex state interactions. MobX is another state management library for React that uses observable data structures to manage state. It provides a more lightweight solution compared to Redux, and is especially useful for managing complex state interactions in large applications.
-
16 React Tools to Help You Keep Your Sanity in a Crazy World
Website: https://redux.js.org/
-
Recoil is the Samurai Sword of React State Management
Recoil was created to provide an alternative to Redux which is another popular state management library for React. In today's adventure, we will see what Recoil is, how it works, why you might want to use it in your React apps and much more..
-
5 Great Custom Hooks For Your React Project
createGlobalSize also belongs to react-use and it provides a way for you to create a global state that can be shared across multiple components without having to go for state management libraries like redux.
-
You don’t need a state management library for React. Use useState + Context
Redux
zustand
-
Which state management library should I use?
For global state, Zustand or RTK
-
Going from Flutter to React
zustand is really good and easy to learn. I don't use redux anymore.
-
Is redux and thunks still used or are there other alternatives for it now?
Zustand is like simplified Redux
-
Redux or React Context api?
Redux is also not ideal to start with. It has great features, but can be difficult to learn at first. Zustand is a simpler library that has many similar concepts. I'd recommend it as a starting point before learning Redux.
Redux seems to mostly be used at large companies that already have Redux deeply embedded in their stack. I would not recommend learning Redux in 2023. I don't think it's the future. Context API is all you need for most projects. At my company we don't even use Context API (where possible). We just use zustand! https://zustand-demo.pmnd.rs/
-
Can react hooks be fine tuned to replace state management libraries like Zustand?
I feel like zustand internal still use hooks at some point: https://github.com/pmndrs/zustand/blob/main/src/context.ts
In 1.0.0 version of zustand, it's still relatively simple: https://github.com/pmndrs/zustand/tree/v1.0.0
-
The Technology Behind “Moyuk”: Create, Run and Share Tools with TypeScript on Your Browser
Initially, I used zustand as a lightweight state management library, but eventually replaced it with React's Context, which was deemed sufficient. This decision was based on a policy of minimizing global state, which has not caused much pain.
-
What's the proper way to call a component function globally in Next 13?
Alternatively you can setup shared state either via Context or a state management lib like zustand or jotai:
-
Thoughts on Svelte
I work with React (NextJS) and from working on things in Vue, and Nuxt - the one thing I absolutely hate about React is state management. If you have never used Pinia[0] (Vuex) with Vue, it's just so, so, so much easier.
I'm using Zustand[1] with React as it is as similar as I can find to Pinia, but the whole hook system is just painful to work with... OK rant over.
I haven't built anything substantial with Svelte, but it's definitely on the radar, and I like how similar it is to Vue single file components (SFC). Hoping state management will be as nice to work with as Pinia is with Vue.
What are some alternatives?
redux-toolkit - The official, opinionated, batteries-included toolset for efficient Redux development
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]
MobX - Simple, scalable state management.
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.
redux-devtools-extension - Redux DevTools extension.
SWR - React Hooks for Data Fetching
react-hook-form - 📋 React Hooks for form state management and validation (Web + React Native)
valtio - 💊 Valtio makes proxy-state simple for React and Vanilla
remix - Build Better Websites. Create modern, resilient user experiences with web fundamentals.
jotai - 👻 Primitive and flexible state management for React
rtk-query - Data fetching and caching addon for Redux Toolkit