Converts Object to boolean. If it it falsey (e.g. 0, null, undefined, etc.), it will be false, otherwise, true.
1!oObject // inverted boolean2!!oObject // non inverted boolean so true boolean
Representation
So !! is not an operator, it’s just the ! operator twice.
Example :
1<CustomModal2 disabled={isDisable}3 title="Delete"4 children="Are you sure you want to delete ?"5 onCancel={() => setDataToDelete(null)}6 onConfirm={() => {}}7 show={!!dataToDelete} //show only accepts boolean8/>;