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

Did you find this page helpful?