You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { useQuery, useConvexClient } from '$lib/client.svelte.js';
119
+
import type { Doc } from '../convex/_generated/dataModel.js';
120
+
import { api } from '../convex/_generated/api.js';
121
+
122
+
const messages = useQuery(
123
+
api.messages.list,
124
+
() => (args),
125
+
() => ({ initialData: data.messages })
126
+
);
127
+
</script>
128
+
````
129
+
130
+
Combining specifying `initialData` and either setting the `keepPreviousData` option to true or never modifying the arguments passed to a query should be enough to avoid ever seeing a loading state for a `useQuery()`.
131
+
90
132
### Deploying a Svelte App
91
133
92
134
In production build pipelines use the build command
0 commit comments