Hi guys i have got an interesting problem. when I am making a req from action for the first the loader are recieving null in the cookies and after making another request than the loader started to getting previous values. keeping the ui always unupdated. as it is recieving the preivous state value. how can i figure this out. here is my code.
#Hi guys i have got an interesting problem. when I am making a req from action for the first the load
1 messages · Page 1 of 1 (latest)
?
export const userPrefs = createCookie("user-prefs", {
maxAge: 604_800, // one week
});
here is the cookie config i m using
if you're not receiving the cookie then it can be because either the Cookie object can't parse it (maybe it was created by another tool? Remix cookies expects them to be JSON.stringified, signed and base64 encoded), or because the browser sent no cookies at all
if that is the case then how the cookies are getting recieved once the action is ran again
dont know why for the first time it is not running
usually this happens if you set SameSite as Strict, but you're not doing it and the default is Lax, so it shouldn't happen
try to check the devtools to see if you're getting the cookie header with your cookie
if you can't find it try to create a reproduction repo or a codesandbox
Ok