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

Function callIfFn

src/tailwind/Backgrounds/Lightfall/Lightfall.jsx:315–319  ·  view source on GitHub ↗
(obj, key)

Source from the content-addressed store, hash-verified

313 container.removeChild(canvas);
314 }
315 const callIfFn = (obj, key) => {
316 if (obj && typeof obj[key] === 'function') {
317 obj[key].call(obj);
318 }
319 };
320 callIfFn(programRef.current, 'remove');
321 callIfFn(geometryRef.current, 'remove');
322 callIfFn(meshRef.current, 'remove');

Callers 1

LightfallFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected