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