You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to propose a feature enhancement for the debounce() function. Currently, debounce() only triggers on the trailing edge. However, in certain use cases, it would be beneficial to have the option to also trigger on the leading edge. This enhancement could significantly improve the perceived performance of an application using this function, as on the start of a series of user actions, an immediate feedback can be given.
The expected behavior would be similar to the debounce implementation in lodash, where both the leading and trailing options are set to true (see "Note" on documentation). This would provide more flexibility and control over the function's behavior, allowing developers to better tailor the function to their specific needs.
Thank you for considering this feature request. I believe this enhancement would be a valuable addition to the radash library.
Best regards.
The text was updated successfully, but these errors were encountered:
Looks like @LynnSha1ng has implemented this in #387. We'd appreciate this improvement over at radashi-org/radashi if anyone wants to transfer it over. :)
Hello,
I would like to propose a feature enhancement for the
debounce()
function. Currently,debounce()
only triggers on the trailing edge. However, in certain use cases, it would be beneficial to have the option to also trigger on the leading edge. This enhancement could significantly improve the perceived performance of an application using this function, as on the start of a series of user actions, an immediate feedback can be given.The expected behavior would be similar to the debounce implementation in lodash, where both the
leading
andtrailing
options are set totrue
(see "Note" on documentation). This would provide more flexibility and control over the function's behavior, allowing developers to better tailor the function to their specific needs.Thank you for considering this feature request. I believe this enhancement would be a valuable addition to the radash library.
Best regards.
The text was updated successfully, but these errors were encountered: