We do not need an advanced dialog (like another React component just for this), thus we wrote:
onClick=“if(confirm(‘Delete the item?’)) {this.deleteItem};”
But we got:
Uncaught Invariant Violation: Expected onClick listener to be a function, instead got type string
How do we workaround this error?
TIA
