I’m trying to check weather a specific cookie exist and delete some data from redux if it doesn’t, but I’m not able to get the cookies even after using a package called ‘cookies-next’.
I’m using client side component in order to mutate the state in redux. Anyone knows how to get cookies in client side with or without a package?
2
Answers
I got the answer that httpOnly cookie can't be accessed using javascript.
If anyone knows any way around to delete data from redux when a cookie is removed, please help.
Using cookies-next package
Without any package
You can access cookies using document.cookie.