UNPKG

syncbasestore

Version:

Lightweight reactive store with built-in filtering and async state handling

12 lines (11 loc) 326 B
import { useBaseFetch } from './useBaseFetch'; export function useClaimBase(tile, field) { if (field !== undefined) { const selector = tile.claim((t) => t[field]); return useBaseFetch(selector); } else { const selector = tile.claim((t) => t); return useBaseFetch(selector); } }