SWR
zustand
SWR | zustand | |
---|---|---|
255 | 282 | |
31,350 | 51,693 | |
0.9% | 2.2% | |
7.8 | 9.2 | |
5 days ago | 6 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.
SWR
-
useSWR usage in vercel/ai-chatbot hooks.
Following is overview picked from SWR site.
-
Using React Suspense with Data Fetching and Concurrent Rendering.
If you need more robust featuresālike caching, re-fetching, or paginationācheck out libraries like React Query or SWR. Many of these tools also offer optional Suspense modes, so you can keep your data-fetching code clean while benefiting from powerful caching and refetching mechanisms.
-
Mastering CRUD with NextJS
Client-Side Data Fetching with useQuery can be used for interactive components that need to fetch data on the client-side, with initial state hydrated from server-side fetched data. For fetching data that changes frequently or for adding client-side interactivity it is useful the useSWR strategy. Itās a React hook for client-side data fetching with caching and revalidation. It allows fetching data on the client side, usually after the initial page load. Nevertheless, it does not fetch data at build time or on the server for SSR, but it can revalidate and fetch new data when required.
-
Is React as hard/complex as it sounds?
SWR for lightweight data fetching
- Session State Management | JS | React
-
Essential Frontend Resources for Next.js Development š
ā” SWR Documentation
-
In-Depth Comparison: How to Choose the Most Suitable Enhanced Request Library
swr
-
The Evolution of React State Management: From Local to Async
We can do this with React-Query, SWR, Redux Toolkit Query and many others.
-
Building a subscription tracker Desktop and iOS app with compose multiplatformāProviding feedbacks
This is a common approach in JS land, and there are plenty of libraries that help abstract the logic and make sure the state is consistent, like swr or TanStack Query.
-
The Ultimate React Roadmap for 2024 - Learn React the Right Way
SWR is a React Hook for data fetching that makes it easy to fetch, cache, and revalidate data at the component level.
zustand
-
# šļø Dolab ā A Lightweight Data-Fetching Hook with Zustand Superpowers ā”
Managing API calls and shared data in React doesn't have to be a hassle. Dolab simplifies this process with a clean, reusable hook powered by Zustand. It's lightweight, fast, and designed for modern frontend development.
-
Why Zustand suceed in the React state management war?
And here we come to Zustand.
-
š React Patterns: Essential Tips and Tricks for Developers
Zustand: https://github.com/pmndrs/zustand
-
Building Modern React Apps in 2025 - A Guide to Cutting-Edge Tools and Tech Stacks
TanStack Query Zustand Jotai Context API
-
React + AI Stack for 2025
For client-side state, Zustand is the way to go. It's got zero boilerplate, a tiny bundle size, and a simple but powerful API that's easy to learn. You can create a store with just a few lines of code, which is pretty neat.
-
My 2025 Tech Stack: Tools & Tech I'm Using This Year
Zustand + Immer. I never used a state management tool because React context API was enough for me until I discovered Zustand last year. It's a simpler and straightforward alternative to Redux.
-
Share My Incorrect Usage Cases of Zustand
Zustand is a simple and easy-to-use state management library.
-
Lessons Learned: Overusing useMemo in React
State Management with Zustand: Zustand offers a lightweight and intuitive approach to managing shared state, reducing the need for derived state or excessive memoization. It simplifies managing and updating global state without extra boilerplate.
-
React v19 has been released
The people behind Jotai also made Zustand and Valtio:
https://github.com/pmndrs/zustand
https://github.com/pmndrs/valtio
To me it feels like Jotai has too much manual boilerplate and Valtio has a lot of "magic" that while I do like it I don't feel like it would be a good idea for a team. Zustand sits right in the middle of boilerplate-vs-magic, and is what I chose for a large project we're doing now.
-
Top 8 Most Popular Open-Source Next.js Boilerplates/Starter
State Management: Zustand
What are some alternatives?
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]
TanStack Query - š¤ Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.
axios - Promise based HTTP client for the browser and node.js
redux-saga - An alternative side effect model for Redux apps
MobX - Simple, scalable state management.