diff --git a/docs/config.json b/docs/config.json index e09f9d1de9..5a3dadd369 100644 --- a/docs/config.json +++ b/docs/config.json @@ -127,10 +127,6 @@ { "label": "SSR & SvelteKit", "to": "framework/svelte/ssr" - }, - { - "label": "Reactivity", - "to": "framework/svelte/reactivity" } ] }, diff --git a/docs/framework/svelte/devtools.md b/docs/framework/svelte/devtools.md index db495f2c0e..c5dbfd4bef 100644 --- a/docs/framework/svelte/devtools.md +++ b/docs/framework/svelte/devtools.md @@ -55,7 +55,7 @@ Place the following code as high in your Svelte app as you can. The closer it is ### Options -- `initialIsOpen: Boolean` +- `initialIsOpen: boolean` - Set this `true` if you want the dev tools to default to being open - `buttonPosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "relative"` - Defaults to `bottom-right` diff --git a/docs/framework/svelte/installation.md b/docs/framework/svelte/installation.md index e4ad607ee0..7fd45eb7df 100644 --- a/docs/framework/svelte/installation.md +++ b/docs/framework/svelte/installation.md @@ -5,8 +5,6 @@ title: Installation You can install Svelte Query via [NPM](https://npmjs.com). -> v5 is currently available as a release-candidate. We don't anticipate any major API changes from here on out. We encourage you to try it out and report any issues you find. - ### NPM ```bash diff --git a/docs/framework/svelte/overview.md b/docs/framework/svelte/overview.md index f1122355aa..e2cc39531e 100644 --- a/docs/framework/svelte/overview.md +++ b/docs/framework/svelte/overview.md @@ -28,19 +28,19 @@ Then call any function (e.g. createQuery) from any component:
- {#if $query.isLoading} + {#if query.isLoading}

Loading...

- {:else if $query.isError} -

Error: {$query.error.message}

- {:else if $query.isSuccess} - {#each $query.data as todo} + {:else if query.isError} +

Error: {query.error.message}

+ {:else if query.isSuccess} + {#each query.data as todo}

{todo.title}

{/each} {/if} @@ -62,6 +62,8 @@ Svelte Query offers useful functions and components that will make managing serv - `useQueryClient` - `useIsFetching` - `useIsMutating` +- `useMutationState` +- `useIsRestoring` - `useHydrate` - `` - `` @@ -70,5 +72,4 @@ Svelte Query offers useful functions and components that will make managing serv Svelte Query offers an API similar to React Query, but there are some key differences to be mindful of. -- Many of the functions in Svelte Query return a Svelte store. To access values on these stores reactively, you need to prefix the store with a `$`. You can learn more about Svelte stores [here](https://learn.svelte.dev/tutorial/writable-stores). -- If your query or mutation depends on variables, you must use a store for the options. You can read more about this [here](../reactivity). +- The arguments to the `create*` functions must be wrapped in a function to preserve reactivity. diff --git a/docs/framework/svelte/reactivity.md b/docs/framework/svelte/reactivity.md deleted file mode 100644 index 8fdab9d13a..0000000000 --- a/docs/framework/svelte/reactivity.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -id: reactivity -title: Reactivity ---- - -Svelte uses a compiler to build your code which optimizes rendering. By default, components run once, unless they are referenced in your markup. To be able to react to changes in options you need to use [stores](https://svelte.dev/docs/svelte-store). - -In the below example, the `refetchInterval` option is set from the variable `intervalMs`, which is bound to the input field. However, as the query is not able to react to changes in `intervalMs`, `refetchInterval` will not change when the input value changes. - -```svelte - - - -``` - -To solve this, we can convert `intervalMs` into a writable store. The query options can then be turned into a derived store, which will be passed into the function with true reactivity. - -```svelte - - - -``` diff --git a/docs/framework/svelte/ssr.md b/docs/framework/svelte/ssr.md index ac6d5ee7ae..7448229caa 100644 --- a/docs/framework/svelte/ssr.md +++ b/docs/framework/svelte/ssr.md @@ -58,11 +58,11 @@ export async function load() { export let data: PageData - const query = createQuery({ + const query = createQuery(() => ({ queryKey: ['posts'], queryFn: getPosts, initialData: data.posts, - }) + })) ``` @@ -136,10 +136,10 @@ export async function load({ parent, fetch }) { import { createQuery } from '@tanstack/svelte-query' // This data is cached by prefetchQuery in +page.ts so no fetch actually happens here - const query = createQuery({ + const query = createQuery(() => ({ queryKey: ['posts'], queryFn: async () => (await fetch('/api/posts')).json(), - }) + })) ``` diff --git a/examples/svelte/auto-refetching/src/routes/+page.svelte b/examples/svelte/auto-refetching/src/routes/+page.svelte index 40fdc0e541..4a31304000 100644 --- a/examples/svelte/auto-refetching/src/routes/+page.svelte +++ b/examples/svelte/auto-refetching/src/routes/+page.svelte @@ -10,7 +10,7 @@ const client = useQueryClient() - const endpoint = 'http://localhost:5173/api/data' + const endpoint = '/api/data' const todos = createQuery<{ items: string[] }>(() => ({ queryKey: ['refetch'], @@ -21,7 +21,9 @@ const addMutation = createMutation(() => ({ mutationFn: (value: string) => - fetch(`${endpoint}?add=${value}`).then((r) => r.json()), + fetch(`${endpoint}?add=${encodeURIComponent(value)}`).then((r) => + r.json(), + ), onSuccess: () => client.invalidateQueries({ queryKey: ['refetch'] }), })) @@ -31,7 +33,7 @@ })) -

Auto Refetch with stale-time set to 1s

+

Auto Refetch with stale-time set to {(intervalMs / 1000).toFixed(2)}s

This example is best experienced on your own machine, where you can open @@ -86,14 +88,22 @@

{/if} -{#if todos.isFetching} -
- 'Background Updating...' : ' ' -
-{/if} + +
Background Updating...
diff --git a/examples/svelte/basic/src/lib/Posts.svelte b/examples/svelte/basic/src/lib/Posts.svelte index e6a0851ee2..1f19e7fe32 100644 --- a/examples/svelte/basic/src/lib/Posts.svelte +++ b/examples/svelte/basic/src/lib/Posts.svelte @@ -38,11 +38,9 @@ {/each} - {#if posts.isFetching} -
- Background Updating... -
- {/if} +
Background Updating...
{/if} @@ -53,8 +51,16 @@ } a { display: block; - color: white; font-size: 1.5rem; margin-bottom: 1rem; } + + .updating-text { + color: transparent; + transition: all 0.3s ease; + } + .updating-text.on { + color: green; + transition: none; + } diff --git a/examples/svelte/load-more-infinite-scroll/src/lib/LoadMore.svelte b/examples/svelte/load-more-infinite-scroll/src/lib/LoadMore.svelte index 32f6e8971d..c03a65441a 100644 --- a/examples/svelte/load-more-infinite-scroll/src/lib/LoadMore.svelte +++ b/examples/svelte/load-more-infinite-scroll/src/lib/LoadMore.svelte @@ -60,5 +60,6 @@ .card { background-color: #111; margin-bottom: 1rem; + color: rgba(255, 255, 255, 0.87); } diff --git a/examples/svelte/optimistic-updates/src/routes/+page.svelte b/examples/svelte/optimistic-updates/src/routes/+page.svelte index feb5d1085c..0caf5ffe7b 100644 --- a/examples/svelte/optimistic-updates/src/routes/+page.svelte +++ b/examples/svelte/optimistic-updates/src/routes/+page.svelte @@ -20,7 +20,7 @@ const client = useQueryClient() - const endpoint = 'http://localhost:5173/api/data' + const endpoint = '/api/data' const fetchTodos = async (): Promise => await fetch(endpoint).then((r) => r.json()) diff --git a/examples/svelte/optimistic-updates/src/routes/api/data/+server.ts b/examples/svelte/optimistic-updates/src/routes/api/data/+server.ts index 46bfe05612..9cf65a54d2 100644 --- a/examples/svelte/optimistic-updates/src/routes/api/data/+server.ts +++ b/examples/svelte/optimistic-updates/src/routes/api/data/+server.ts @@ -6,7 +6,7 @@ type Todo = { text: string } -const items: Todo[] = [] +const items: Array = [] /** @type {import('./$types').RequestHandler} */ export const GET: RequestHandler = async (req) => { diff --git a/examples/svelte/playground/src/routes/AddTodo.svelte b/examples/svelte/playground/src/routes/AddTodo.svelte index 514e4b8ee7..f482f6c2f1 100644 --- a/examples/svelte/playground/src/routes/AddTodo.svelte +++ b/examples/svelte/playground/src/routes/AddTodo.svelte @@ -14,7 +14,6 @@ let name = $state('') const postTodo = async ({ name, notes }: Omit) => { - console.info('postTodo', { name, notes }) return new Promise((resolve, reject) => { setTimeout( () => { @@ -31,7 +30,7 @@ } const todo = { name, notes, id: id.value } id.value = id.value + 1 - list.value = [...list.value, todo] + list.value.push(todo) resolve(todo) }, queryTimeMin.value + diff --git a/examples/svelte/playground/src/routes/App.svelte b/examples/svelte/playground/src/routes/App.svelte index 04ddbb9b40..bd909aae90 100644 --- a/examples/svelte/playground/src/routes/App.svelte +++ b/examples/svelte/playground/src/routes/App.svelte @@ -26,7 +26,7 @@ - -
Data: {query.data ?? 'undefined'}
-
Count: {count}
diff --git a/packages/svelte-query/tests/createQuery/PlaceholderData.svelte b/packages/svelte-query/tests/createQuery/PlaceholderData.svelte deleted file mode 100644 index 4c6781682d..0000000000 --- a/packages/svelte-query/tests/createQuery/PlaceholderData.svelte +++ /dev/null @@ -1,39 +0,0 @@ - - - - -
Status: {query.status}
-
Data: {query.data ?? 'undefined'}
diff --git a/packages/svelte-query/tests/createQuery/RefetchExample.svelte b/packages/svelte-query/tests/createQuery/RefetchExample.svelte deleted file mode 100644 index 45b445dd76..0000000000 --- a/packages/svelte-query/tests/createQuery/RefetchExample.svelte +++ /dev/null @@ -1,40 +0,0 @@ - - - - - -
Data: {query.data ?? 'undefined'}
diff --git a/packages/svelte-query/tests/createQuery/createQuery.svelte.test.ts b/packages/svelte-query/tests/createQuery/createQuery.svelte.test.ts deleted file mode 100644 index f01a21db4f..0000000000 --- a/packages/svelte-query/tests/createQuery/createQuery.svelte.test.ts +++ /dev/null @@ -1,409 +0,0 @@ -import { describe, expect, test } from 'vitest' -import { fireEvent, render, waitFor } from '@testing-library/svelte' -import { QueryClient } from '@tanstack/query-core' -import { ref, sleep } from '../utils.svelte.js' -import BaseExample from './BaseExample.svelte' -import DisabledExample from './DisabledExample.svelte' -import PlaceholderData from './PlaceholderData.svelte' -import RefetchExample from './RefetchExample.svelte' -import type { QueryObserverResult } from '@tanstack/query-core' - -describe('createQuery', () => { - test('Return the correct states for a successful query', async () => { - let states = ref>([]) - - const options = { - queryKey: ['test'], - queryFn: async () => { - await sleep(5) - return 'Success' - }, - } - - const rendered = render(BaseExample, { - props: { - options: () => options, - queryClient: new QueryClient(), - states, - }, - }) - - await waitFor(() => { - expect(rendered.queryByText('Status: success')).toBeInTheDocument() - }) - - expect(states.value).toHaveLength(2) - - expect(states.value[0]).toMatchObject({ - data: undefined, - dataUpdatedAt: 0, - error: null, - errorUpdatedAt: 0, - failureCount: 0, - failureReason: null, - errorUpdateCount: 0, - isError: false, - isFetched: false, - isFetchedAfterMount: false, - isFetching: true, - isPaused: false, - isPending: true, - isInitialLoading: true, - isLoading: true, - isLoadingError: false, - isPlaceholderData: false, - isRefetchError: false, - isRefetching: false, - isStale: true, - isSuccess: false, - refetch: expect.any(Function), - status: 'pending', - fetchStatus: 'fetching', - }) - - expect(states.value[1]).toMatchObject({ - data: 'Success', - dataUpdatedAt: expect.any(Number), - error: null, - errorUpdatedAt: 0, - failureCount: 0, - failureReason: null, - errorUpdateCount: 0, - isError: false, - isFetched: true, - isFetchedAfterMount: true, - isFetching: false, - isPaused: false, - isPending: false, - isInitialLoading: false, - isLoading: false, - isLoadingError: false, - isPlaceholderData: false, - isRefetchError: false, - isRefetching: false, - isStale: true, - isSuccess: true, - refetch: expect.any(Function), - status: 'success', - fetchStatus: 'idle', - }) - }) - - test('Return the correct states for an unsuccessful query', async () => { - let states = ref>([]) - - const options = { - queryKey: ['test'], - queryFn: async () => Promise.reject(new Error('Rejected')), - retry: 1, - retryDelay: 1, - } - - const rendered = render(BaseExample, { - props: { - options: () => options, - queryClient: new QueryClient(), - states, - }, - }) - - await waitFor(() => rendered.getByText('Status: error')) - - expect(states.value).toHaveLength(3) - - expect(states.value[0]).toMatchObject({ - data: undefined, - dataUpdatedAt: 0, - error: null, - errorUpdatedAt: 0, - failureCount: 0, - failureReason: null, - errorUpdateCount: 0, - isError: false, - isFetched: false, - isFetchedAfterMount: false, - isFetching: true, - isPaused: false, - isPending: true, - isInitialLoading: true, - isLoading: true, - isLoadingError: false, - isPlaceholderData: false, - isRefetchError: false, - isRefetching: false, - isStale: true, - isSuccess: false, - refetch: expect.any(Function), - status: 'pending', - fetchStatus: 'fetching', - }) - - expect(states.value[1]).toMatchObject({ - data: undefined, - dataUpdatedAt: 0, - error: null, - errorUpdatedAt: 0, - failureCount: 1, - failureReason: new Error('Rejected'), - errorUpdateCount: 0, - isError: false, - isFetched: false, - isFetchedAfterMount: false, - isFetching: true, - isPaused: false, - isPending: true, - isInitialLoading: true, - isLoading: true, - isLoadingError: false, - isPlaceholderData: false, - isRefetchError: false, - isRefetching: false, - isStale: true, - isSuccess: false, - refetch: expect.any(Function), - status: 'pending', - fetchStatus: 'fetching', - }) - - expect(states.value[2]).toMatchObject({ - data: undefined, - dataUpdatedAt: 0, - error: new Error('Rejected'), - errorUpdatedAt: expect.any(Number), - failureCount: 2, - failureReason: new Error('Rejected'), - errorUpdateCount: 1, - isError: true, - isFetched: true, - isFetchedAfterMount: true, - isFetching: false, - isPaused: false, - isPending: false, - isInitialLoading: false, - isLoading: false, - isLoadingError: true, - isPlaceholderData: false, - isRefetchError: false, - isRefetching: false, - isStale: true, - isSuccess: false, - refetch: expect.any(Function), - status: 'error', - fetchStatus: 'idle', - }) - }) - - test('Accept a writable store for options', async () => { - let states = ref>([]) - - const optionsStore = $state(() => ({ - queryKey: ['test'], - queryFn: async () => { - await sleep(5) - return 'Success' - }, - })) - - const rendered = render(BaseExample, { - props: { - options: optionsStore, - queryClient: new QueryClient(), - states, - }, - }) - - await waitFor(() => { - expect(rendered.queryByText('Status: success')).toBeInTheDocument() - }) - }) - - test('Accept a derived store for options', async () => { - let states = ref>([]) - - const writableStore = $state('test') - - const derivedStore = $derived(() => ({ - queryKey: [writableStore], - queryFn: async () => { - await sleep(5) - return 'Success' - }, - })) - - const rendered = render(BaseExample, { - props: { - options: derivedStore, - queryClient: new QueryClient(), - states, - }, - }) - - await waitFor(() => { - expect(rendered.queryByText('Status: success')).toBeInTheDocument() - }) - }) - - test('Ensure reactivity when queryClient defaults are set', async () => { - let states = ref>([]) - - let writableStore = $state(1) - - const derivedStore = $derived(() => ({ - queryKey: [writableStore], - queryFn: async () => { - await sleep(5) - return writableStore - }, - })) - - const rendered = render(BaseExample, { - props: { - options: derivedStore, - queryClient: new QueryClient({ - defaultOptions: { queries: { staleTime: 60 * 1000 } }, - }), - states, - }, - }) - - await waitFor(() => { - expect(rendered.queryByText('Data: 1')).toBeInTheDocument() - expect(rendered.queryByText('Data: 2')).not.toBeInTheDocument() - }) - - writableStore = 2 - - await waitFor(() => { - expect(rendered.queryByText('Data: 1')).not.toBeInTheDocument() - expect(rendered.queryByText('Data: 2')).toBeInTheDocument() - }) - - writableStore = 1 - - await waitFor(() => { - expect(rendered.queryByText('Data: 1')).toBeInTheDocument() - expect(rendered.queryByText('Data: 2')).not.toBeInTheDocument() - }) - }) - - test('Keep previous data when placeholderData is set', async () => { - let states = ref>([]) - - const rendered = render(PlaceholderData, { - props: { - queryClient: new QueryClient(), - states, - }, - }) - - await waitFor(() => rendered.getByText('Data: 0')) - - fireEvent.click(rendered.getByRole('button', { name: 'setCount' })) - - await waitFor(() => rendered.getByText('Data: 1')) - - expect(states.value).toHaveLength(4) - - // Initial - expect(states.value[0]).toMatchObject({ - data: undefined, - isFetching: true, - isSuccess: false, - isPlaceholderData: false, - }) - - // Fetched - expect(states.value[1]).toMatchObject({ - data: 0, - isFetching: false, - isSuccess: true, - isPlaceholderData: false, - }) - - // Set state - expect(states.value[2]).toMatchObject({ - data: 0, - isFetching: true, - isSuccess: true, - isPlaceholderData: true, - }) - - // New data - expect(states.value[3]).toMatchObject({ - data: 1, - isFetching: false, - isSuccess: true, - isPlaceholderData: false, - }) - }) - - test('Should not fetch when switching to a disabled query', async () => { - let states = ref>([]) - - const rendered = render(DisabledExample, { - props: { - states, - }, - }) - - await waitFor(() => rendered.getByText('Data: 0')) - - fireEvent.click(rendered.getByRole('button', { name: /Increment/i })) - - await waitFor(() => { - rendered.getByText('Count: 0') - rendered.getByText('Data: 0') - }) - - expect(states.value).toHaveLength(3) - - // Fetch query - expect(states.value[0]).toMatchObject({ - data: undefined, - isFetching: true, - isSuccess: false, - }) - - // Fetched query - expect(states.value[1]).toMatchObject({ - data: 0, - isFetching: false, - isSuccess: true, - }) - - // Switch to disabled query - expect(states.value[2]).toMatchObject({ - data: undefined, - isFetching: false, - isSuccess: false, - }) - }) - - test('Create a new query when refetching a removed query', async () => { - let states = ref>([]) - - const rendered = render(RefetchExample, { - props: { - states, - }, - }) - - await waitFor(() => rendered.getByText('Data: 1')) - fireEvent.click(rendered.getByRole('button', { name: /Remove/i })) - - await sleep(5) - - fireEvent.click(rendered.getByRole('button', { name: /Refetch/i })) - await waitFor(() => rendered.getByText('Data: 2')) - - expect(states.value).toHaveLength(4) - // Initial - expect(states.value[0]).toMatchObject({ data: undefined, dataUpdatedAt: 0 }) - // Fetched - expect(states.value[1]).toMatchObject({ data: 1 }) - // Switch - expect(states.value[2]).toMatchObject({ data: undefined, dataUpdatedAt: 0 }) - // Fetched - expect(states.value[3]).toMatchObject({ data: 2 }) - }) -}) diff --git a/packages/svelte-query/tests/createQuery/createQuery.test-d.ts b/packages/svelte-query/tests/createQuery/createQuery.test-d.ts deleted file mode 100644 index eb65c66306..0000000000 --- a/packages/svelte-query/tests/createQuery/createQuery.test-d.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { describe, expectTypeOf, test } from 'vitest' -import { createQuery, queryOptions } from '../../src/index.js' -import type { CreateQueryOptions } from '../../src/index.js' - -describe('createQuery', () => { - test('TData should always be defined when initialData is provided as an object', () => { - const query = createQuery(() => ({ - queryKey: ['key'], - queryFn: () => ({ wow: true }), - initialData: { wow: true }, - })) - - expectTypeOf(query.data).toEqualTypeOf<{ wow: boolean }>() - }) - - test('TData should be defined when passed through queryOptions', () => { - const options = queryOptions({ - queryKey: ['key'], - queryFn: () => ({ wow: true }), - initialData: { wow: true }, - }) - const query = createQuery(() => options) - - expectTypeOf(query.data).toEqualTypeOf<{ wow: boolean }>() - }) - - test('TData should always be defined when initialData is provided as a function which ALWAYS returns the data', () => { - const query = createQuery(() => ({ - queryKey: ['key'], - queryFn: () => ({ wow: true }), - initialData: () => ({ wow: true }), - })) - - expectTypeOf(query.data).toEqualTypeOf<{ wow: boolean }>() - }) - - test('TData should have undefined in the union when initialData is NOT provided', () => { - const query = createQuery(() => ({ - queryKey: ['key'], - queryFn: () => { - return { - wow: true, - } - }, - })) - - expectTypeOf(query.data).toEqualTypeOf<{ wow: boolean } | undefined>() - }) - - test('Allow custom hooks using CreateQueryOptions', () => { - type Data = string - - const useCustomQuery = (options?: CreateQueryOptions) => { - return createQuery(() => ({ - ...options, - queryKey: ['todos-key'], - queryFn: () => Promise.resolve('data'), - })) - } - - const query = useCustomQuery() - - expectTypeOf(query.data).toEqualTypeOf() - }) -}) diff --git a/packages/svelte-query/tests/queryOptions/queryOptions.test-d.ts b/packages/svelte-query/tests/queryOptions/queryOptions.test-d.ts index f27b56823c..1dc175f61e 100644 --- a/packages/svelte-query/tests/queryOptions/queryOptions.test-d.ts +++ b/packages/svelte-query/tests/queryOptions/queryOptions.test-d.ts @@ -45,9 +45,9 @@ describe('queryOptions', () => { queryFn: () => Promise.resolve(5), }) - const queries = createQueries({ - queries: () => [options], - }) + const queries = createQueries(() => ({ + queries: [options], + })) expectTypeOf(queries[0].data).toEqualTypeOf() }) diff --git a/packages/svelte-query/tests/useIsFetching/BaseExample.svelte b/packages/svelte-query/tests/useIsFetching/BaseExample.svelte index 5e67704dfd..ec5513b47f 100644 --- a/packages/svelte-query/tests/useIsFetching/BaseExample.svelte +++ b/packages/svelte-query/tests/useIsFetching/BaseExample.svelte @@ -17,11 +17,11 @@ }, enabled: ready, }), - queryClient, + () => queryClient, ) -
isFetching: {isFetching()}
+
isFetching: {isFetching.current}
Data: {query.data ?? 'undefined'}
diff --git a/packages/svelte-query/tests/useIsFetching/useIsFetching.test.ts b/packages/svelte-query/tests/useIsFetching/useIsFetching.svelte.test.ts similarity index 100% rename from packages/svelte-query/tests/useIsFetching/useIsFetching.test.ts rename to packages/svelte-query/tests/useIsFetching/useIsFetching.svelte.test.ts diff --git a/packages/svelte-query/tests/useIsMutating/BaseExample.svelte b/packages/svelte-query/tests/useIsMutating/BaseExample.svelte index 42ae0416e7..275d84e9d4 100644 --- a/packages/svelte-query/tests/useIsMutating/BaseExample.svelte +++ b/packages/svelte-query/tests/useIsMutating/BaseExample.svelte @@ -1,8 +1,7 @@ -
isMutating: {isMutating()}
+
isMutating: {isMutating.current}
diff --git a/packages/svelte-query/tests/useIsMutating/useIsMutating.test.ts b/packages/svelte-query/tests/useIsMutating/useIsMutating.svelte.test.ts similarity index 100% rename from packages/svelte-query/tests/useIsMutating/useIsMutating.test.ts rename to packages/svelte-query/tests/useIsMutating/useIsMutating.svelte.test.ts diff --git a/packages/svelte-query/tests/useMutationState/BaseExample.svelte b/packages/svelte-query/tests/useMutationState/BaseExample.svelte index b65cd41371..535485473b 100644 --- a/packages/svelte-query/tests/useMutationState/BaseExample.svelte +++ b/packages/svelte-query/tests/useMutationState/BaseExample.svelte @@ -1,11 +1,13 @@