score:0

Accepted answer

convert this function to arrow function

functiontest  = (e) => {
    e.preventdefault();
    console.log(this.state.test)
}

or use the bind statement to bind the value of this to class not to function itself


Related Query

More Query from same tag