Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jorgecoke/zustand-query

๐Ÿป Enhanced Zustand to query HTTP API Requests, including loading state and error handling with Zustand, without any extra data-fetching library [Lab ๐Ÿงช]
https://github.com/jorgecoke/zustand-query

fetch query zustand

Last synced: about 1 month ago
JSON representation

๐Ÿป Enhanced Zustand to query HTTP API Requests, including loading state and error handling with Zustand, without any extra data-fetching library [Lab ๐Ÿงช]

Awesome Lists containing this project

README

        


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?

- React: https://react.dev/
- Zustand: https://github.com/pmndrs/zustand
- Typescript: https://www.typescriptlang.org/

## 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
```