4 ms·
In the OP's case, the _why_ can be encoded in function names. For example: function DatePicker() { function handleDateChange(event) { prevent
by strager 4y ago
In the OP's case, the _why_ can be encoded in function names. For example:
function DatePicker() {
function handleDateChange(event) {
preventDialogFoobarFromClosing(event);
...
}
return (
<ThirdPartyDatePicker
onChange={handleDateChange}
/>
);
}
function preventDialogFoobarFromClosing(event) {
event.preventDefault();
}