How Async React handles transitions and loading states
mainThe Async React vision aims to reduce the need for manual API management by integrating async capabilities into core layers:
- Routing: Uses transitions by default, so navigation updates do not require manual wrapping in transitions.
- Data Fetching: Uses Suspense by default, allowing the use of transitions and Suspense throughout the application.
- Design Components: Expose
actionprops so that callbacks are executed within async transitions by default. These components use optimistic updates to automatically handle results and delayed loading states.
Network Timing Behavior:
- Fast network (<150ms): The app feels synchronous with no visible loading states.
- Slow network (>150ms): The app automatically displays loading states and batches updates to prevent async bugs.