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

Method resetDemoState

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

Source from the content-addressed store, hash-verified

144 }
145
146 private async resetDemoState(): Promise<void> {
147 resetTodoApi()
148 this.cacheSeedCount = 0
149 this.nextTodoTitle = 'Add mutation assertion'
150
151 await demoQueryClient.resetQueries({ queryKey: todosQueries.all() })
152 this.createTodoMutation.reset()
153 }
154
155 render() {
156 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