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

Method resetDemoState

examples/lit/basic/src/main.ts:152–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150 }
151
152 private async resetDemoState(): Promise<void> {
153 resetTodoApi()
154 this.cacheSeedCount = 0
155 this.nextTodoTitle = 'Add mutation assertion'
156
157 await demoQueryClient.resetQueries({ queryKey: ['todos'] })
158 this.createTodoMutation.reset()
159 }
160
161 render() {
162 const query = this.todosQuery()

Callers 1

renderMethod · 0.95

Calls 3

resetTodoApiFunction · 0.90
resetQueriesMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected