For getting cookie no need for a third party npm package. We can use javascript to get the cookie. getCookie is a custom function for getting cookie.
export function getCookie(key:string) {
const cookie = document.cookie.match("(^|;)\\s*" + key + "\\s*=\\s*([^;]+)");
return cookie ? cookie.pop() : "";
}
0 Comments
If you have any question please ask?