79624250

Date: 2025-05-15 22:29:25
Score: 1
Natty:
Report link
onFocus={setTipPercent(null)} 

This triggers a state update during rendering, which forces React to re-render, which then calls setTipPercent(null) again, creating an infinite loop.

Try changing it to use an arrow function to delay execution until focus:

onFocus={() => setTipPercent(null)}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Tolga Durman Tschika