xnimorz / use-debounce

A debounce hook for react

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How the leading option can be changed dynamically?

AjaxSolutions opened this issue · comments

I'd like to use the leading: true option while testing a component and leading: false otherwise.

How can I do this?

commented

Hi @AjaxSolutions

I'm not sure I get you right. Do you mean unit testing or E2E tests?

Talking about E2E, you could do it by providing a prop to the component which will set a correct param