score:1

Accepted answer

because you use nested anonymous functions, the internal function scope of this is different. you can bind this, or assign this to another variable in upper function

(item) => {
  const self = this;
  
  return (h) => (
  
    <button onclick={ () => {console.log(self)} }>
      <span class="uk-margin-small-left" uk-icon="icon: file-edit"></span>
      edit
    </button>
  );
}


Related Query

More Query from same tag