-
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)