Next.js Discord

Discord Forum

Difference between component types

Answered
Cuban Crocodile posted this in #help-forum
Open in Discord
Cuban CrocodileOP
i was following the learn guide of next js and i have a brief idea of what different component are can someone affirm my beliefs

Client side components - you cant use event handling here

Server side components -
1 > static component - fetched once and a static file is created of the response wont make this again and again
2> dynamic component - fetches everytime doesnt cache anything.
Answered by ᴉuɐpɹɐɐ
Client side components - you cant use event handling here
You can, thats the whole point

Server side components -
1 > static component - fetched once and a static file is created of the response wont make this again and again
2> dynamic component - fetches everytime doesnt cache anything.
Dynamic component can also be cached but its cached at the data level, not the page level
View full answer

8 Replies

@Cuban Crocodile i was following the learn guide of next js and i have a brief idea of what different component are can someone affirm my beliefs Client side components - you cant use event handling here Server side components - 1 > static component - fetched once and a static file is created of the response wont make this again and again 2> dynamic component - fetches everytime doesnt cache anything.
Client side components - you cant use event handling here
You can, thats the whole point

Server side components -
1 > static component - fetched once and a static file is created of the response wont make this again and again
2> dynamic component - fetches everytime doesnt cache anything.
Dynamic component can also be cached but its cached at the data level, not the page level
Answer
Cuban CrocodileOP
Dynamic component can also be cached but its cached at the data level, not the page level
this
data level meaning in fetchFunctions?
@Cuban Crocodile data level meaning in fetchFunctions?
Yes, and other non fetch function
Cuban CrocodileOP