-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(sessions): Correction about commitSession in non-cookie sessions #9445
base: main
Are you sure you want to change the base?
Conversation
|
Co-authored-by: Mehdi Achour <machour@gmail.com>
Closes: #9444
The docs for
createCookieSessionStorage
state:https://remix.run/docs/en/main/utils/sessions#createcookiesessionstorage
When we moved from
createCookieSessionStorage
to another storage solution (createKvSessionStorage
from@vercel/remix
), we followed this advice and removed calls tocommitSession
(assuming it was not needed, and thatsession.set
would be all that is required) but it resulted in sessions not being saved.Elsewhere in the docs for
createSessionStorage
:https://remix.run/docs/en/main/utils/sessions#createsessionstorage
Which seems to imply that anything based on
createSessionStorage
will require a call tocommitSession
in order to update the session, and I'm fairly sure explains why we would have bugs when removing calls tocommitSession
.