MCPcopy Create free account
hub / github.com/adobe/react-spectrum / onChange

Function onChange

packages/dev/docs/src/ThemeSwitcher.js:30–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28
29 useEffect(() => {
30 let onChange = () => {
31 setColorScheme(getCurrentColorScheme());
32 };
33
34 mq.addListener(onChange);
35 window.addEventListener('storage', onChange);

Callers

nothing calls this directly

Calls 1

setColorSchemeFunction · 0.50

Tested by

no test coverage detected