79501515

Date: 2025-03-11 16:57:57
Score: 1.5
Natty:
Report link

you could try to add onClick conditionally:

<div {...!disabled && {onClick}}>{children}</div>

this way there will not be onClick added to the div if it is disabled

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Michal Skula