You can call cookies() in a React Server Component today. But if you try to set a cookie, nothing happens.

This behavior is intentional.

React Server Components (RSC) do not participate in the HTTP response lifecycle. They execute during rendering — a phase that can be repeated, restarted, speculated, aborted, cached, or occur without a corresponding client request. This is a fundamental constraint of the RSC model, not a missing feature.

Rendering produces descriptions of UI. Responses produce effects on the outside world.

These concerns are separated for correctness.

Renders May Replay

A render is not guaranteed to correspond to a user event or to a single network response. Frameworks are free to:

  • Replay renders after suspending
  • Retry renders after error…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help