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

Function getCurrent

src/forest/template.ts:333–345  ·  view source on GitHub ↗
(ref: StateRef, forkPage?: Scope)

Source from the content-addressed store, hash-verified

331}
332
333function getCurrent(ref: StateRef, forkPage?: Scope) {
334 let result
335 if (forkPage) result = forkPage.getState(ref)
336 else result = ref.current
337 switch (ref.type) {
338 case 'list':
339 return [...result]
340 case 'shape':
341 return {...result}
342 default:
343 return result
344 }
345}
346function findRef(
347 ref: StateRef,
348 targetLeaf: Leaf | null,

Callers 1

spawnFunction · 0.85

Calls 1

getStateMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…