use-cookie icon indicating copy to clipboard operation
use-cookie copied to clipboard

cookie value not updated on external cookie change

Open raDiesle opened this issue 6 years ago • 2 comments

Hi,

What I did: update cookie in browser cookie settings with another value. Value is not reflected in example ui, but on page reload

raDiesle avatar Oct 02 '19 08:10 raDiesle

Hello @raDiesle,

Yeah, you have to reload the page for it to capture the browser value. This feature you are requesting for requires watching the browser cookie value and syncing with the React state. Though, the initial plan is to hydrate the browser value on page load then only sync updates from React state to Browser. I will see what I can do.

Thanks for using!

devhammed avatar Dec 23 '19 07:12 devhammed

Screenshot from 2020-01-06 08-57-26

I am already working on your feature request, don't know if using setInterval is the best for the job though.

Do you have a better suggestion?

devhammed avatar Jan 06 '20 07:01 devhammed