| 43 | const key = createKey() |
| 44 | |
| 45 | class Consumer extends LitElement { |
| 46 | readonly queryKey = key |
| 47 | |
| 48 | readonly query = createQueryController(this, { |
| 49 | queryKey: this.queryKey, |
| 50 | queryFn: () => sleep(10).then(() => 'query-ok'), |
| 51 | retry: false, |
| 52 | }) |
| 53 | |
| 54 | readonly isFetching = useIsFetching(this, { queryKey: this.queryKey }) |
| 55 | |
| 56 | override render() { |
| 57 | return html`<p>fetching: ${this.isFetching()}</p>` |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | customElements.define(generateElementName(), Consumer) |
| 62 | const consumer = new Consumer() |
nothing calls this directly
no test coverage detected