MCPcopy
hub / github.com/dubinc/dub / handleStorageChange

Function handleStorageChange

packages/ui/src/hooks/use-cookies.ts:17–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15 useEffect(() => {
16 // Update state if the cookie changes
17 const handleStorageChange = () => {
18 const item = Cookies.get(key);
19 if (item) {
20 setStoredValue(JSON.parse(item));
21 }
22 };
23
24 // Add listener for storage changes
25 window.addEventListener("storage", handleStorageChange);

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…