{"repo":"react-hookz/web","free":true,"listed":false,"github":"https://github.com/react-hookz/web","clone":"git clone https://github.com/react-hookz/web.git","description":"React hooks done right, for browser and SSR.","language":"TypeScript","stars":2211,"topics":["react","hook","react-hook","browser","ssr","hacktoberfest","hooks","react-hooks"],"license":"MIT","category":"ui-components","readme_excerpt":"× DISCORD × RELEASES × --- @react-hookz/web is a library of general-purpose React hooks built with care and SSR compatibility in mind. Install This one is pretty simple, everyone knows what to do: As hooks was introduced to the world in React 16.8, @react-hookz/web requires - you guessed it - react and react-dom 16.8+. Also, as React does not support IE, @react-hookz/web don't either. Usage This package distributed with ESNext language level and ES modules system. It means that depending on your browser target you might need to transpile it. Every major bundler provides a way to transpile node modules fully or partially. Address your bundler documentation for more details. You can import hooks two ways: In case your bundler supports tree-shaking (most of modern does) - both variants are equal and only necessary code will get into your bundle. Direct hook imports should be considered otherwise. Migrating from react-use @react-hookz/web was built as a spiritual successor of react-use by one of its former maintainers. Hooks list - #### Callback - useDebouncedCallback — Makes passed function debounced, otherwise acts like useCallback . - useRafCallback — Makes passed function to be called within next animation frame. - useThrottledCallback — Makes passed function throttled, otherwise acts like useCallback . - #### Lifecycle - useConditionalEffect — Like useEffect but callback invoked only if given conditions match a given predicate. - useCustomCompareEffect — Like useEffect but u","default_branch":null,"files":null,"tree":[],"storefront":"/r/react-hookz","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/react-hookz/web/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}