MCPcopy Create free account
hub / github.com/TanStack/query / getList

Function getList

examples/lit/auto-refetching/src/mocks.ts:6–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4const storageKey = 'auto-refetching-list'
5
6const getList = (): Array<string> =>
7 JSON.parse(localStorage.getItem(storageKey) ?? 'null') ?? [
8 'Item 1',
9 'Item 2',
10 'Item 3',
11 ]
12
13const setList = (list: Array<string>) =>
14 localStorage.setItem(storageKey, JSON.stringify(list))

Callers 1

mocks.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected