trpc refetchinterval

In the server-side component, how should I perform data access polling, for example, using refetchinterval
No description
No description
7 Replies
cje
cje11mo ago
You do it in a client component
birch
birchOP11mo ago
No description
birch
birchOP11mo ago
Is there room for optimization in implementing it this way?
cje
cje11mo ago
Optimizing what?
birch
birchOP11mo ago
that useEffect the data returned for the first time will be undefined.
cje
cje11mo ago
What do you need the useEffect for if you’re setting a refetchInterval?
birch
birchOP11mo ago
thank you for your reminder, realize I wrote redundant code
Want results from more Discord servers?
Add your server