/zustand-query

🐻 Enhanced Zustand to query HTTP API Requests, including loading state and error handling with Zustand, without any extra data-fetching library [Lab 🧪]

Primary LanguageTypeScript

Zustand and Fetch logo

🐻 Zustand Query + Data-Fetching [Lab 🧪]

Enhanced Zustand to query HTTP API Requests, including loading state and error handling with Zustand, without any extra data-fetching library

What's included?

Features

  • State management with Zustand
  • Loading state while fetching http requests and error handling out-of-the-box, with zero-config (can be easly customized)
  • React-Query alike API
  • Generic Reset action. Reset your store to its initial state
  • Extended Set action. Call your Set action directly from your components
  • Query data from your API. Duplicated query actions are ignored!
  • Typescript's type safety

Set up

npm ci                          # Install dependencies
npm run dev                     # Launch project locally