-
-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
When a component with query is rendered conditionally, gqty makes too many (in my case 5) requests
query.tsx
import { useQuery } from '../utils/client'
import Test from './test'
export default function Example() {
const query = useQuery()
return (
<>
<p>User: {query.user?.name}</p>
<div>
{ query.user?.name?.includes('Max') ? <Test /> : 'Not Mish' }
</div>
</>
)
}test.tsx
'use client';
import { useQuery } from '../utils/client'
export default function Example() {
const query = useQuery()
return (
<>
<p>Age: {query.user?.age}</p>
</>
)
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels