src/stores/fetcher.ts
import { type Fetcher, nanoquery } from '@nanostores/query'
export const fetcher: Fetcher<unknown> = async (
...args: unknown[]
): Promise<unknown> => {
const res = await fetch(args.join(''))
return await res.json()
}
export const [createFetcherStore, createMutatorStore] = nanoquery({
fetcher
})