79727361

Date: 2025-08-06 13:41:25
Score: 2.5
Natty:
Report link

React state updates are asynchronous, so UI changes might not appear instantly if you're not reflecting the state visually. To show the active (clicked) button right away, use a separate state (like clickedOption) and conditionally apply a CSS class to highlight the selected button.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Rostyslav Boryk