
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
react-recipes
Advanced tools
A React Hooks utility library containing popular customized hooks
What's your favorite dish?
npm i react-recipes --save
yarn add react-recipes
| Name | Returns | Arguments |
|---|---|---|
🍡 useAdjustColor | color | (percentage, color1, color2: null, linearBlend: false) |
🥟 useArray | { value, setValue, removeById, removeIndex, clear } | (initialValue) |
🔄 useAsync | { error, execute, pending, value } | (asyncFunction, immediate: true) |
🍪 useCookie | [cookieValue, updateCookie, deleteCookie] | (cookieName, initialValue) |
🥠 useCopyClipboard | [isCopied, setIsCopied] | (duration: 2000) |
🍩 useDarkMode | [enabled, setEnabledState] | - |
🍜 useDebounce | debouncedValue | (value, delay) |
🥡 useDimensions | [ref, dimensions, node] | (liveMeasure: true, delay: 250, initialDimensions: {}, effectDependencies: []) |
🍳 useEventListener | - | (eventName, handle, element: window) |
🌮 useFullScreen | { fullScreen, open, close, toggle } | (element: document.documentElement) |
🌯 useGeolocation | { latitude, longitude, timestamp, accuracy, error } | (watch: false, settings: {enableHighAccuracy: false, timeout: Infinity, maximumAge: 0}) |
🌭 useHover | [callbackRef, value] | - |
🍦 useInterval | - | (callback, delay, runOnLoad: false, effectDependencies: []) |
🍐 useIsClient | isClient | - |
🥧 useKeyPress | keyPressed | (targetKey) |
🍱 useLocalStorage | [storedValue, setValue] | (key, initialValue) |
📍 useLocation | { push, replace, pathname, search } | - |
🍋 useLockBodyScroll | - | - |
🍉 useMedia | value | (queries, values, defaultValue) |
🥭 useMultiKeyPress | keysPressed | (targetKey) |
🔔 useNotification | fireNotify | (title, options) |
🥑 useOnClickOutside | - | (ref, callback) |
🥒 useOnlineStatus | onlineStatus | - |
🍿 usePrevious | previous | (value) |
🖨 usePrint | { ref, handlePrint } | (style = {}) |
:question: useQueryParams | { getParams, setParams } | - |
🍣 useScript | [loaded, error] | (src) |
🍖 useSpeechRecognition | { supported, listen, listening, stop } | ({ onEnd, onResult, onError }) |
🍗 useSpeechSynthesis | { supported, speak, speaking, cancel, voices, pause, resume } | ({ onEnd, onResult, onError, onBoundary, onPause, onResume }) |
🍏 useThrottle | throttledValue | (value, ms: 250) |
🍷 useWhyDidYouUpdate | - | (name, props) |
🥖 useWindowScroll | { x, y } | - |
🥮 useWindowSize | { height, width } | (initialWidth, initialHeight) |
🥝 useWorker | worker instance | (scriptPath, workerOptions, attributes) |
FAQs
A React Hooks utility library containing popular customized hooks
We found that react-recipes demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.