Implementing Optimistic Updates in Next.js using React 18's `useOptimistic` Hook