I am trying to change the state on the click of a button I created through DOM methods. I tried passing "this" as a variable through the arguments of the function
var self="this"
b.addEventListener("click", function(self){
self.setState({health:100}) })
and also tried adding .bind(this) at the end of the function but no luck.
b.addEventListener("click", function(){
this.setState({health:100}) })