useOptimistic returns the optimistic state and a dispatch-like function that applies an optimistic update.
Question 3 of 20 in useOptimistic Quiz