With this library, you can create cookies using Cookies.set(). You can also define the number of days until the cookie expires:
Cookies.set('name', 'Buffy', { expires: 365 });
Additionally, you can use Cookies.set() to update cookies.
Cookies.set('name', 'Sabrina', { expires: 50 });
With the JavaScript Cookie library, you can specify which data you want to extract using Cookies.get():
Cookies.get('name'); //returns Sabrina
To delete a cookie, you no longer need to specify an expiry date in the past; instead, you can use:
Cookies.remove('name');