What am I doing wrong in this code, I don't know how else to write it I want to test the state invalidForm and render disabled or null depending.
state code UPDATE
if(valid) {
return true;
} else {
this.setState({
invalidForm: true
})
}
}
<button {this.state.invalidForm ? 'disabled' : null} type="submit">Submit</button>
The Error I am getting is
Unexpected token, expected "..."