export function MyComponent() {
// This will prevent the query from running in SSR, and avoiding any hydration mismatch errors
if (typeof window === 'undefined') throw Promise.resolve('Suspense in SSR');
const [data] = api.dashboard.getStats.useSuspenseQuery();
return <>...</>
}
export function MyComponent() {
// This will prevent the query from running in SSR, and avoiding any hydration mismatch errors
if (typeof window === 'undefined') throw Promise.resolve('Suspense in SSR');
const [data] = api.dashboard.getStats.useSuspenseQuery();
return <>...</>
}