React 19 · React 19 features

Show an optimistic update

Show the expected result immediately while the request is in flight.

const [optimisticTodos, addOptimistic] = useOptimistic(todos, (state, todo: Todo) => [...state, todo]);

Official React 19 documentation

More react 19 features commands

All react 19 features commands · React 19 cheatsheet

Was this page helpful?