Re-render
Unanswered
Cuvier’s Dwarf Caiman posted this in #help-forum
Cuvier’s Dwarf CaimanOP
does server components in nextjs only renders when there is fetching of data happening??
16 Replies
@Cuvier’s Dwarf Caiman does server components in nextjs only renders when there is fetching of data happening??
what are you referring by
server components? Like a route, or a server-only file?Cuvier’s Dwarf CaimanOP
server-only
not the api route
Can you share your code if possible, so I can understand your question better
Or more specifically, do you mean
server-actions or server-only filesserver-only files can be files like db.ts|js & server-actions can be actions/login.ts
Cuvier’s Dwarf CaimanOP
so, we have client components, which only re-renders if there is a state changed right
how about on server component
i have no code file, i am just curious on top of my head
Server component, you can't rerender it
However, you can pass data to a
'use client' file, and with api routes/server actions, you can rerender itCuvier’s Dwarf CaimanOP
ok thanks will look into this
and come back here if i have more questions
Sure, and if your issue is resolved, which could be in a few hours, mark my message as a solution
@Cuvier’s Dwarf Caiman is your issue resolved?
If you've any other questions, don't hesitate to ping me, which could also be in other threads!