1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-06-30 21:52:05 +02:00
blog/src/stores/fetcher.ts

7 lines
210 B
TypeScript
Raw Normal View History

import { nanoquery } from '@nanostores/query'
export const [createFetcherStore, createMutatorStore] = nanoquery({
fetcher: (...keys: (string | number)[]) =>
fetch(keys.join('')).then((r) => r.json())
})