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

Function delete

examples/react-native/offline-transactions/src/utils/api.ts:85–96  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

83 },
84
85 async delete(id: string): Promise<boolean> {
86 const response = await fetch(`${BASE_URL}/api/todos/${id}`, {
87 method: 'DELETE',
88 })
89 if (response.status === 404) {
90 return false
91 }
92 if (!response.ok) {
93 throw new Error(`Failed to delete todo: ${response.status}`)
94 }
95 return true
96 },
97}

Callers

nothing calls this directly

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected