I ain’t understanding why I need to bind
the event handler function with the this
and what this
refers here and if I bind then how can I use the event
object ??
you did bind here to pass “Kam…” as an argument when the function is called.
“this” in “.bind(this, “Kam…”)” is useless. you can replace it with empty object nothing would change . the reason for that is you can’t rebind arrow functions "I refer to “switchHandler” "
I you can make the click handler more cleaner like this
click={()=> this.swtichHandler("Kam...")}