I am working on Reactjs and using nextjs framework,I used cookie for user login and now at logout time i want to delete/remove cookie,How can i do this ? here is my code for add cookie
Cookies.set('email', email )
I am working on Reactjs and using nextjs framework,I used cookie for user login and now at logout time i want to delete/remove cookie,How can i do this ? here is my code for add cookie
Cookies.set('email', email )
I think you're using the package js-cookie
To remove the cookie while logging out call Cookies.remove('email')
at the end of the handler function.
If the log out call returns a positive response for successful logout, then maybe use that as a condition for removing the cookie.