UNPKG

zstoreq

Version:

zustand-query is a library that helps you to query You can cal your api and get the data and store it in zustand store

14 lines (13 loc) 316 B
// src/errorHandler.ts let globalErrorHandler = null; export function setGlobalErrorHandler(handler) { globalErrorHandler = handler; } export function handleError(err) { if (globalErrorHandler) { globalErrorHandler(err); } else { console.error("[zustand-query error]:", err); } }