MCPcopy
hub / github.com/facebook/react / sub

Function sub

packages/react-devtools-shared/src/hook.js:241–244  ·  view source on GitHub ↗
(event: string, fn: Handler)

Source from the content-addressed store, hash-verified

239 let hasDetectedBadDCE = false;
240
241 function sub(event: string, fn: Handler) {
242 hook.on(event, fn);
243 return () => hook.off(event, fn);
244 }
245
246 function on(event: string, fn: Handler) {
247 if (!listeners[event]) {

Callers

nothing calls this directly

Calls 2

onMethod · 0.80
offMethod · 0.80

Tested by

no test coverage detected