MCPcopy Index your code
hub / github.com/effector/effector / reset

Function reset

src/effector/createUnit.ts:298–309  ·  view source on GitHub ↗
(...units: CommonUnit[])

Source from the content-addressed store, hash-verified

296 scope: forkPage!,
297 }),
298 reset(...units: CommonUnit[]) {
299 assert(
300 // @ts-expect-error
301 store.targetable,
302 '.reset of derived store is not supported',
303 errorTitle,
304 )
305 forEach(units, unit =>
306 on(store, '.reset', unit, () => store.defaultState, errorTitle),
307 )
308 return store
309 },
310 on(nodeSet: CommonUnit | CommonUnit[], fn: Function) {
311 assert(
312 // @ts-expect-error

Callers 5

effector.test.tsFile · 0.85
region.test.tsFile · 0.85
reset.test.tsFile · 0.85
useVModel.test.tsFile · 0.85

Calls 3

assertFunction · 0.90
forEachFunction · 0.90
onFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…