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

Function update

src/components/common/ComponentList.jsx:166–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164 const [savedSet, setSavedSet] = useState(() => new Set(getSavedComponents()));
165 useEffect(() => {
166 const update = () => setSavedSet(new Set(getSavedComponents()));
167 const onStorage = e => {
168 if (!e || e.key === 'savedComponents') update();
169 };

Callers 1

onStorageFunction · 0.70

Calls 1

getSavedComponentsFunction · 0.90

Tested by

no test coverage detected