score:3

Accepted answer

you could define the click handler function somewhere outside the config variable, and it should have access to everything outside the scope of the event.

myrerenderfunction(e) { /* do something */ } // define function here...

var config = {
      ...
          events: {
              click: myrerenderfunction // ...and it's accessible since they're defined in the same scope
          }
    };

or you could just put the rerendering itself outside the click handler.

myrerenderfunction(e) { /* do something */ } // this is now a closure...

var config = {
      ...
          events: {
              click: function(e) {
                  /* do something with the event */
                  myrerenderfunction(e); // ...which means you can access it from inside the click handler function
              }
          }
    };

or you could just store the current this as a closure.

var whateverscopethisis = this;

var config = {
      ...
          events: {
              click: function(e) {
                  /* do something with the event */
                  whateverscopethisis.dosomething(e);
              }
          }
    };

you've got plenty of options, something along those lines should work.

score:0

try to use

events: {
   click: function (event) {
       window.reactnativewebview.postmessage(event)
   }
}

Related Query