score:4

Accepted answer

you can make a button look like disabled with styles. if you set the disabled attribute to true, it won't trigger onclick because it's not actually listening to it.

you should try something like that:

//disabled button
<button
  style={this.state.passingvalidtions ? {
    ...
    opacity: "0.65",
    cursor: "not-allowed"
  } : { ... }} // style can be whatever you want for disabled buttons, it's just an example
  type="submit"
>
  save
</button>

Related Query

More Query from same tag