I have a server component that reads from the database:
import { db } from "@utils/database";
export async function UsersLayout() {
let users = await db.query(...);
// ...
return (
<ul>
{users.map(user =>
<li key={user.id}>{user.name}</li>
)}
</ul>
)
}
How can I make this component re-render every 60 seconds? Since this is a server component I cannot use useEffect
and setTimeout
...
I'm playing around with Nextjs.13