Package Exports
- @restart/hooks/useAnimationFrame.js
- @restart/hooks/useBreakpoint.js
- @restart/hooks/useCallbackRef.js
- @restart/hooks/useCommittedRef.js
- @restart/hooks/useCustomEffect.js
- @restart/hooks/useDebouncedCallback.js
- @restart/hooks/useDebouncedState.js
- @restart/hooks/useDebouncedValue.js
- @restart/hooks/useEventCallback.js
- @restart/hooks/useEventListener.js
- @restart/hooks/useFocusManager.js
- @restart/hooks/useForceUpdate.js
- @restart/hooks/useGlobalListener.js
- @restart/hooks/useImage.js
- @restart/hooks/useImmediateUpdateEffect.js
- @restart/hooks/useIntersectionObserver.js
- @restart/hooks/useInterval.js
- @restart/hooks/useIsInitialRenderRef.js
- @restart/hooks/useIsomorphicEffect.js
- @restart/hooks/useMap.js
- @restart/hooks/useMediaQuery.js
- @restart/hooks/useMergeState.js
- @restart/hooks/useMergeStateFromProps.js
- @restart/hooks/useMergedRefs.js
- @restart/hooks/useMountEffect.js
- @restart/hooks/useMounted.js
- @restart/hooks/useMutationObserver.js
- @restart/hooks/usePrevious.js
- @restart/hooks/useRafInterval.js
- @restart/hooks/useRefWithInitialValueFactory.js
- @restart/hooks/useResizeObserver.js
- @restart/hooks/useSafeState.js
- @restart/hooks/useSet.js
- @restart/hooks/useStableMemo.js
- @restart/hooks/useStateAsync.js
- @restart/hooks/useThrottledEventHandler.js
- @restart/hooks/useTimeout.js
- @restart/hooks/useToggleState.js
- @restart/hooks/useUpdateEffect.js
- @restart/hooks/useUpdateImmediateEffect.js
- @restart/hooks/useUpdateLayoutEffect.js
- @restart/hooks/useUpdatedRef.js
- @restart/hooks/useWillUnmount.js
Readme
@restart/hooks 
A set of utility and general-purpose React hooks.
Install
npm install @restart/hooks
Usage
import useInterval from '@restart/hooks/useInterval'
useInterval(() => loop(), 300, false)