How to use react-class-hooks - 10 common examples

To help you get started, we’ve selected a few react-class-hooks examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github salvoravida / react-universal-hooks / src / index.js View on Github external
function useCallback(...args) {
  return isFunctional() ? _useCallback(...args) : useClassCallback(...args);
}
github salvoravida / react-universal-hooks / src / index.js View on Github external
function useContext(...args) {
  return isFunctional() ? _useContext(...args) : useClassContext(...args);
}
github salvoravida / react-universal-hooks / src / index.js View on Github external
function useDebugValue(...args) {
  return isFunctional() ? _useDebugValue(...args) : useClassDebugValue(...args);
}
github salvoravida / react-universal-hooks / src / index.js View on Github external
function useEffect(...args) {
  return isFunctional() ? _useEffect(...args) : useClassEffect(...args);
}
github salvoravida / react-universal-hooks / src / index.js View on Github external
function useImperativeHandle(...args) {
  return isFunctional() ? _useImperativeHandle(...args) : useClassImperativeHandle(...args);
}
function useDebugValue(...args) {
github salvoravida / react-universal-hooks / src / index.js View on Github external
function useLayoutEffect(...args) {
  return isFunctional() ? _useLayoutEffect(...args) : useClassLayoutEffect(...args);
}
github salvoravida / react-universal-hooks / src / index.js View on Github external
function useMemo(...args) {
  return isFunctional() ? _useMemo(...args) : useClassMemo(...args);
}
github salvoravida / react-universal-hooks / src / index.js View on Github external
function useReducer(...args) {
  return isFunctional() ? _useReducer(...args) : useClassReducer(...args);
}
github salvoravida / react-universal-hooks / src / index.js View on Github external
function useRef(...args) {
  return isFunctional() ? _useRef(...args) : useClassRef(...args);
}
github salvoravida / react-universal-hooks / src / index.js View on Github external
function useState(...args) {
  return isFunctional() ? _useState(...args) : useClassState(...args);
}