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

Method render

examples/lit/playground/src/main.ts:70–198  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68 }
69
70 render() {
71 return html`
72 <playground-query-provider>
73 <p>
74 The "staleTime" and "gcTime" durations have been altered in this
75 example to show how query stale-ness and query caching work on a
76 granular level
77 </p>
78 <div>
79 Stale Time:
80 <input
81 type="number"
82 min="0"
83 step="1000"
84 .value=${String(this.staleTime)}
85 style=${styleMap({ width: '100px' })}
86 @input=${(event: Event) =>
87 this.onNumberChange(event, (value) => (this.staleTime = value))}
88 />
89 </div>
90 <div>
91 Garbage collection Time:
92 <input
93 type="number"
94 min="0"
95 step="1000"
96 .value=${String(this.gcTime)}
97 style=${styleMap({ width: '100px' })}
98 @input=${(event: Event) =>
99 this.onNumberChange(event, (value) => (this.gcTime = value))}
100 />
101 </div>
102 <br />
103 <div>
104 Error Rate:
105 <input
106 type="number"
107 min="0"
108 max="1"
109 step=".05"
110 .value=${String(this.localErrorRate)}
111 style=${styleMap({ width: '100px' })}
112 @input=${(event: Event) =>
113 this.onNumberChange(
114 event,
115 (value) => (this.localErrorRate = value),
116 )}
117 />
118 </div>
119 <div>
120 Fetch Time Min:
121 <input
122 type="number"
123 min="1"
124 step="500"
125 .value=${String(this.localFetchTimeMin)}
126 style=${styleMap({ width: '60px' })}
127 @input=${(event: Event) =>

Callers

nothing calls this directly

Calls 2

onNumberChangeMethod · 0.95
invalidateQueriesMethod · 0.45

Tested by

no test coverage detected