Sometimes, we want to disable button in React.
In this article, we’ll look at how to disable button in React.
How to disable button in React?
To disable button in React, we can set the disabled prop.
For instance, we write
<button disabled={value}>button</button>;
to set the disabled prop to the value state.
Conclusion
To disable button in React, we can set the disabled prop.