Allow a function call once and only once
· ☕ 1 min read
Allow a function to be called once and only once.
We have previously seen an example where debounce can be used to call a function once and can ignore subsequent calls.
There is a shorthand way to allow a single function call that if you are not interested in the debounce part of the problem.