re: ravenous part three project
Hi, everyone! I still don’t understand why binding .handleSortByChange
method to this
in the constructor method does not work (for step 9).
I guess I am still wrapping my head around the concept of the this
keyword and bind
method and haven’t yet figured out how using them in the constructor method is different from using them in the .map
method inside the .renderSortByOptions
method.
My understanding is that this
refers to the current instance of the component class, but
- does it refer to something different inside the
.map
method, - am I completely wrong,
- or just missing some thing.
I’ve read some of the MDN docs e.g Function.prototype.bind() and tried searching the internet but haven’t found anything that addresses this specifically. Can someone help me out or point me to some resources that will.