Commit ee98aaa
authored
fix: clear old timers in useDeferredTrigger (#19)
With React 18, useEffect can run twice on mount in
strict mode (during development), which would lead
to a spurious timer remaining active. The timer always
needs to be cleared before a new one is set.1 parent 2651374 commit ee98aaa
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
0 commit comments