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