Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function useCallback(...args) {
return isFunctional() ? _useCallback(...args) : useClassCallback(...args);
}
function useContext(...args) {
return isFunctional() ? _useContext(...args) : useClassContext(...args);
}
function useDebugValue(...args) {
return isFunctional() ? _useDebugValue(...args) : useClassDebugValue(...args);
}
function useEffect(...args) {
return isFunctional() ? _useEffect(...args) : useClassEffect(...args);
}
function useImperativeHandle(...args) {
return isFunctional() ? _useImperativeHandle(...args) : useClassImperativeHandle(...args);
}
function useDebugValue(...args) {
function useLayoutEffect(...args) {
return isFunctional() ? _useLayoutEffect(...args) : useClassLayoutEffect(...args);
}
function useMemo(...args) {
return isFunctional() ? _useMemo(...args) : useClassMemo(...args);
}
function useReducer(...args) {
return isFunctional() ? _useReducer(...args) : useClassReducer(...args);
}
function useRef(...args) {
return isFunctional() ? _useRef(...args) : useClassRef(...args);
}
function useState(...args) {
return isFunctional() ? _useState(...args) : useClassState(...args);
}