DEV Community

Discussion on: Creating your own bind() (Polyfill of bind)

Collapse
 
uddeshjain profile image
Uddesh

Arrow function are really helpful for adopting ‘this’ from their parent and in most of the use cases we don’t need ‘bind()’, But what if you want ‘this’ to refer to a particular object then you need to use ‘bind()’. I hope you got my point.

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

To be honest, I only use bind for it's less well known second Param. I avoid using this and prefer pure functions, I have very few reasons to make this do anything, bimut that's just me ☺️