This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[Bug]: Cookies are missing in request
for loaders and actions in CSR
#10819
Labels
What version of React Router are you using?
6.15.0
Steps to Reproduce
Create a Route with a loader (in CSR) and get
Cookie
header from the request.Expected Behavior
I expect cookies to be available through the
Cookie
header (as theyaremight be in SSR) so I can use the same piece of code for both CSR and SSR.Actual Behavior
The cookies are not available in the
Cookie
header.Analyzing the
createClientSideRequest
function inreact-router/packages/router/router.ts
, it looks like the cookies (fromdocument.cookie
) are not included in theRequest
created:Notes
It might be a feature request but since it's available in SSR, I expect the same behavior in CSR.
The text was updated successfully, but these errors were encountered: