duct Set Cookie

duct Set Cookie

Easy function to create cookies on the browser

duct-set-cookie setup

npm i duct-set-cookie

Add the duct-set-cookie package in the component you want to use after installation.

import setCookie from 'duct-set-cookie'

ready to use

setCookie("cookieName", "value", 60);

The setCookie function takes 3 values. The 1st value is the Cookie name, the 2nd value is the value of the Cookie, and the 3rd value is the time the cookie will remain in seconds.