-
released this
2023-11-19 13:03:56 +03:00 | 0 commits to main since this releaseWe are thrilled to announce the release of useHover, a new custom React hook designed to simplify hover state detection in your React applications. This hook offers an elegant and reusable solution for detecting when a user's cursor is hovering over a component, enhancing the interactivity and responsiveness of your UI.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
Source code (ZIP)
-
v1.7.4 Stable
released this
2023-11-19 12:33:20 +03:00 | 2 commits to main since this releaseWe're excited to introduce useUpdateEffect, a custom React hook designed to enhance the way you handle side effects in your components. This innovative hook extends the functionality of the standard useEffect, focusing exclusively on updates, bypassing the initial render phase.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
Source code (ZIP)
-
v1.7.2 Stable
released this
2023-11-19 11:45:35 +03:00 | 6 commits to main since this releaseThe useAsync hook is a powerful addition to any React developer's toolkit, designed to streamline the handling of asynchronous operations. This custom hook elegantly abstracts the complexities associated with asynchronous data fetching, state management, and error handling.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
Source code (ZIP)
-
v1.7.1 Stable
released this
2023-10-04 16:06:09 +03:00 | 8 commits to main since this releaseWe are thrilled to introduce our new custom hook - useMediaQuery! This hook provides an easy and convenient way to work with media queries right inside your React components, making them more responsive and dynamic.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
Source code (ZIP)
-
v1.7.0 Stable
released this
2023-08-16 18:57:57 +03:00 | 10 commits to main since this releaseRelease 1.7.0 - Changelog
New Features:
useWindowSize Hook: Introduced a new custom hook to track browser window size changes.
Fetch the current width and height of the window.
Auto-updates values when the window is resized.
Optimized to prevent unnecessary re-renders.
TypeScript support for strict typing and enhanced integration.
Improvements:
Enhanced performance and responsiveness in components that utilize window size, thanks to the new useWindowSize hook.
Memory usage optimizations during frequent window resizes.
Documentation:
Added a dedicated section in the documentation for the useWindowSize hook, inclusive of usage examples, guidelines, and best practices.Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
Source code (ZIP)
-
released this
2023-07-26 15:50:16 +03:00 | 19 commits to main since this releaseWe're excited to announce our new release featuring two custom React hooks, useDebounce and useThrottle!
The useDebounce hook provides a simple way to limit the rate at which a function can execute. This is particularly useful when you have a function that shouldn't execute until after a certain time has elapsed since its last invocation. Check the Usage section for an example of a debounced search input function.
The useThrottle hook, on the other hand, ensures that a function cannot be called more than once every X milliseconds. This is beneficial in situations where you need to prevent a function from being called too frequently, such as a resize or scroll event listener in a web application.
Both hooks have been fully tested with Jest and the React Testing Library. They are released under the MIT license, and as always, contributions are highly welcome! If you have any ideas, improvements, or bug fixes, please don't hesitate to open an issue or submit a pull request.
Special thanks to SynDevUI and Askadar for their contributions to this release.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
Source code (ZIP)
-
released this
2023-07-26 13:23:10 +03:00 | 35 commits to main since this releaseWe are pleased to announce two new additions to our React hooks library, useInterval and useTimeout.
useInterval is a custom React hook enabling the execution of a specific function at regular intervals. It is a beneficial tool for features requiring periodic updates such as countdown timers or auto-refresh features.
useTimeout is another custom React hook aimed at delaying the execution of a particular function for a predetermined period of time. It can be effectively utilized in various scenarios where a delay in function execution is required, like toast notifications or timed redirects.
Both hooks are fully tested with Jest and React Testing Library, and contributions for enhancements, bug fixes, or ideas are warmly welcomed. We look forward to your collaboration as we continue to enhance our React hooks library.
For more details, examples, and usage guides, please check the respective repositories. The project is licensed under the MIT License.
Special thanks to SynDevUI and Askadar for their contributions to this release.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
Source code (ZIP)
-
v1.4.1 Stable
released this
2023-07-26 12:16:40 +03:00 | 47 commits to main since this releaseIn this release, we're excited to introduce a new functionality - the usePrevious hook. This hook allows you to easily retain and utilize the previous value of a state variable.
Additions
usePrevious hook: Provides a way to get the previous value of a state variable. This can be handy in cases where the current value of a variable needs to be compared to its previous value.
Usage
import usePrevious from 'react-hook-kit'; const YourComponent = () => { const [count, setCount] = React.useState(0); const prevCount = usePrevious(count); //... your logic }In the example above, prevCount will always contain the previous value of count.
Special thanks to SynDevUI for their contributions to this release.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
Source code (ZIP)
-
released this
2023-07-26 09:54:02 +03:00 | 55 commits to main since this releaseNew Features
- Added
useOnClickOutsidehook. This new hook allows you to easily detect clicks that occur outside of a specified element. This can be useful for things like closing dropdowns, modals, or popups when a user clicks anywhere else on the page.
How to use
- The
useOnClickOutsidehook takes two parameters: an array of refs and a callback function. The hook will call the callback function whenever a click occurs outside of the elements referred to by the refs. - Here is a simple usage example:
const TestComponent = ({ callback }: { callback: () => void }) => { const ref = React.useRef<HTMLElement | null>(null); useOnClickOutside([ref], callback); return <div ref={ref}>Test Element</div>; };
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- Added
-
v1.2.6 Stable
released this
2023-07-24 18:02:24 +03:00 | 60 commits to main since this releasen this release, we made significant updates to our useFetch custom React hook and its associated documentation. These changes will help to improve the experience of developers who use this hook in their projects. Here are the details:
Enhancements to the useFetch Hook: The hook now utilizes the AbortController interface to provide a way to cancel fetch requests. This change helps to prevent memory leaks and unexpected behavior in your applications when components unmount while a fetch is still pending.
Inclusion of Loading States: We've added loading states to our hook. This will enable developers to display appropriate loading UIs to users while a fetch request is pending.
Error Handling: The hook now has improved error handling capabilities, making it easier for developers to catch and deal with fetch errors.
Updated Documentation: We've overhauled our documentation for the useFetch hook. The new docs provide clear usage examples and offer a deep dive into the hook's inner workings, enabling developers to better understand and utilize it.
We believe these updates will greatly improve your experience when working with our useFetch hook. As always, we look forward to your feedback and appreciate your continued support.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
Source code (ZIP)