Add a simple JavaScript confirmation popup on a button in React.
<button type="button" onClick={() => { if (window.confirm('Are you sure?')) { this.delete_obj(this.props.id); } }}>Delete Object</button>
Add a simple JavaScript confirmation popup on a button in React.
<button type="button" onClick={() => { if (window.confirm('Are you sure?')) { this.delete_obj(this.props.id); } }}>Delete Object</button>