MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / onStorage

Function onStorage

src/components/common/ComponentList.jsx:167–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165 useEffect(() => {
166 const update = () => setSavedSet(new Set(getSavedComponents()));
167 const onStorage = e => {
168 if (!e || e.key === 'savedComponents') update();
169 };
170 window.addEventListener('favorites:updated', update);
171 window.addEventListener('storage', onStorage);
172 return () => {

Callers

nothing calls this directly

Calls 1

updateFunction · 0.70

Tested by

no test coverage detected