MCPcopy
hub / github.com/alibaba/hooks / dec

Function dec

packages/hooks/src/useCounter/index.ts:55–57  ·  view source on GitHub ↗
(delta: number = 1)

Source from the content-addressed store, hash-verified

53 };
54
55 const dec = (delta: number = 1) => {
56 setValue((c) => c - delta);
57 };
58
59 const set = (value: ValueParam) => {
60 setValue(value);

Callers 2

demo1.tsxFile · 0.85
index.spec.tsFile · 0.85

Calls 1

setValueFunction · 0.85

Tested by

no test coverage detected