mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 00:20:04 +01:00
1.3 KiB
1.3 KiB
March 22, 2024 (18.3.0-canary-670811593-20240322)
React
- Added
useActionStateto replaceuseFormStateand addedpendingvalue (#28491).
October 5, 2023 (18.3.0-canary-546178f91-20231005)
React
- Added support for async functions to be passed to
startTransition. useTransitionnow triggers the nearest error boundary instead of a global error.- Added
useOptimistic, a new Hook for handling optimistic UI updates. It optimistically updates the UI before receiving confirmation from a server or external source.
React DOM
- Added support for passing async functions to the
actionprop on<form>. When the function passed toactionis marked with'use server', the form is progressively enhanced. - Added
useFormStatus, a new Hook for checking the submission state of a form. - Added
useFormState, a new Hook for updating state upon form submission. When the function passed touseFormStateis marked with'use server', the update is progressively enhanced.