Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

Child.svelte

11 lines297 Bytes

1<script lang="ts">
2 import { sleep } from '@tanstack/query-test-utils'
3 import { createQuery } from '../../src/index.js'
4​
5 const query = createQuery(() => ({
6 queryKey: ['hello'],
7 queryFn: () => sleep(10).then(() => 'test'),
8 }))
9</script>
10​
11<div>Data: {query.data ?? 'undefined'}</div>