MCPcopy Create free account
hub / github.com/QuarkGluonPlasma/react-course-code / isFunction

Function isFunction

controlled-and-uncontrolled/src/App.tsx:35–37  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

33 const mergedValue = propsValue === undefined ? stateValue : propsValue;
34
35 function isFunction(value: unknown): value is Function {
36 return typeof value === 'function';
37 }
38
39 const setState = useCallback((value: SetStateAction<T>) => {
40 let res = isFunction(value) ? value(stateValue) : value

Callers 1

useMergeStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected