streamich/react-use

useDebounce and cancellation

开放

#401 创建于 2019年6月18日

 (5 条评论) (6 个反应) (0 位负责人)TypeScript (3,273 个派生)batch import
enhancementhelp wanted

仓库指标

星标
 (43,979 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Similar to how debounce does it, the hook should return callbacks to clear and flush. This is important for scenarios, where some other action has immediate priority and debounce, should be silenced in that case. The typical is having debounced submit of form input but be able to just hit Enter to speed up the action.

Personally, I haven't used flush operation anywhere yet and cannot imagine some practical use case for it.

贡献者指南