useCookie
useCookie copied to clipboard
Remove cookie
There are functions to get/set cookies but none to remove an existing cookie.
@Odonno this seems reasonable since there are already exported functions for get/set. Feel free to open a PR. Otherwise, I'll see if I can get around to adding this in the next couple weeks
I managed to do it this way:
setCookie(COOKIE_KEY, "", { days: 0 });
I don't know if it's the fastest/best way but that could be easy to create a removeCookie function from that.