79638335

Date: 2025-05-26 05:15:19
Score: 1
Natty:
Report link

A few things:

  1. Optimistic state should be updated using useTransition() rather than just a normal function.
  2. Unlike a form action, your state won't be refetched from the server when your optimistic state finishes. You need to manually call router.refresh() or something when using useTransition() and updating the state on the server.
Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Eliot Hertenstein