MCPcopy Create free account
hub / github.com/effector/effector / off

Function off

src/effector/createUnit.ts:319–328  ·  view source on GitHub ↗
(unit: CommonUnit)

Source from the content-addressed store, hash-verified

317 return on(store, '.on', nodeSet, fn, errorTitle)
318 },
319 off(unit: CommonUnit) {
320 const triggerUnitId = getGraph(unit).id
321 const oldLink = getGraph(store).family.links.find(
322 e => e.meta.onTrigger === triggerUnitId,
323 )
324 if (oldLink) {
325 clearNode(oldLink)
326 }
327 return store
328 },
329 map(fn: (value: any) => any, outerConfig: Config) {
330 let mapConfig: Config | undefined
331 if (isObject(fn)) {

Callers

nothing calls this directly

Calls 2

getGraphFunction · 0.90
clearNodeFunction · 0.90

Tested by

no test coverage detected