MCPcopy Create free account
hub / github.com/DTStack/dt-react-component / getValue

Function getValue

src/useMergeOption/demos/basic.tsx:13–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11 const merged = useMergeOption(state, { day: true });
12
13 const getValue = () => {
14 if (state === false) return 0;
15 if (state === true) return 2;
16 return 1;
17 };
18 const setValue = (value: number) => {
19 setState([false, { day: false }, true][value]);
20 };

Callers 1

BasicFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected