I am creating a cookie by using react babel but I am facing a problem. When I create a cookie the cookie created in the browser but when I click on the URL to authenticate then the cookies remove from the browser, and when I create it again, the two cookies with an old one and a new one is created in the browser. When I delete a cookie and refresh the page the two cookies again created in the browser. I don't understand how is this possible? I am using this code to create and delete a cookie-
cookies.remove("WebTimeClock", {
path: "/labor-settings",
domain: "localhost",
});
and for create a cookie I am using this-
cookies.set("WebTimeClock", currentUniqueID, {
expires: new Date(dateTime),
});
I am using "react-cookie" for this.