MCPcopy Create free account
hub / github.com/szhsin/react-menu / stopTimer

Function stopTimer

src/components/SubMenu.js:63–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61 const [timerId] = useState({ v: 0 });
62
63 const stopTimer = () => {
64 submenuCtx.off();
65 if (timerId.v) {
66 clearTimeout(timerId.v);
67 timerId.v = 0;
68 }
69 };
70
71 const openMenu = (...args) => {
72 stopTimer();

Callers 2

openMenuFunction · 0.85
onPointerLeaveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…