Open History to see the last commit
1<script lang="ts">
2 import { QueryClient } from '@tanstack/query-core'
3 import { setQueryClientContext } from '../context'
4 import { createQuery } from '../createQuery'
5 import type { CreateQueryOptions } from '../types'
6β
7 export let options: CreateQueryOptions
8β
9 const queryClient = new QueryClient()
10 setQueryClientContext(queryClient)
11β
12 const query = createQuery(options)
13</script>
14β
15{#if $query.isLoading}
16 <p>Loading</p>
17{:else if $query.isError}
18 <p>Error</p>
19{:else if $query.isSuccess}
20 <p>Success</p>
21{/if}