4 ms·
One of the most common places front-end devs encountered call/apply was when binding functions to event handlers. In those cases an anonymous function was often
by singlow 4y ago
One of the most common places front-end devs encountered call/apply was when binding functions to event handlers. In those cases an anonymous function was often generated which used apply or call. Bind replaces this dance for many cases. Hence, most cases where devs encountered js call/apply were replaced by bind. There are differences between the two, but they largely didn't matter for most cases.
- 29athrowaway 4y agoUnless you have strict performance requirements, then it does matter.