MCPcopy Create free account
hub / github.com/TanStack/db / delete

Function delete

examples/react-native/shopping-list/src/utils/api.ts:73–82  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

71 },
72
73 async delete(id: string): Promise<ApiTxResult<{ success: boolean }> | null> {
74 const response = await offlineAwareFetch(`${API_URL}/api/lists/${id}`, {
75 method: 'DELETE',
76 })
77 if (response.status === 404) return null
78 if (!response.ok) {
79 throw new Error(`Failed to delete list: ${response.status}`)
80 }
81 return response.json()
82 },
83}
84
85// ─── Items API ──────────────────────────────────────────

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected