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
cje12mo ago
You do it in a client component
birch
birchOP12mo ago
No description
birch
birchOP12mo ago
Is there room for optimization in implementing it this way?
cje
cje12mo ago
Optimizing what?
birch
birchOP12mo ago
that useEffect the data returned for the first time will be undefined.
cje
cje12mo ago
What do you need the useEffect for if you’re setting a refetchInterval?
birch
birchOP12mo ago
thank you for your reminder, realize I wrote redundant code
Want results from more Discord servers?
Add your server