Hacker News new | ask | show | jobs
by sophiebits 422 days ago
React offers a useOptimistic Hook that is designed for client-side optimistic updates and automatically handles reverting the update upon failure, etc: https://react.dev/reference/react/useOptimistic