I'm creating a digital clock component and currently using "use client" and "useEffect"
useEffect(() => {
const timer = setInterval(() => {
setDate(new Date());
}, clockConfig.refreshInterval);
return () => {
clearInterval(timer);
};
}, []);
Is there a way to do this with a server-side component?