score:0

please check below sample code. please apply to your system.

class todoapp extends react.component {
  constructor(props) {
    super(props);
    this.state = {
     input: ''
    }
    this.handleclick = this.handleclick.bind(this);
    this.handleclick2 = this.handleclick2.bind(this);
    this.handlechange = this.handlechange.bind(this);
  }
  
  handleclick(e) {
    console.log('button value :', e)
  };
  
  handlechange(e) {
    this.setstate({ input: e.target.value });
  };

  handleclick2() {
    console.log("test box value : ", this.state.input);
  };
  
  render() {
    return (
      <div>
        <input type="button" onclick={() => {this.handleclick("abc")}} value="button"/>
        <br/>
        or
        <br/>
        
        <input type="text" onchange={(e) => {this.handlechange(e)}} />
        <input
          type="button"
          value="alert the text input"
          onclick={() =>{this.handleclick2()}}
        />
      </div>
    )
  }
}

reactdom.render(<todoapp />, document.getelementbyid('root'));
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react-dom.min.js"></script>
<div id='root'></div>

score:1

you're having function inside function and not calling that.

botaocontinuar = () => {
      function continuar() {

what you have described to do so, you may call like:

botaocontinuar = () => {
  function continuar() {
  }
  this.finalizarounao()
  continuar()
}

Related Query

More Query from same tag