mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Mini-refactor of useActionState to only wrap the action in a transition context if the dispatch is called during a transition. Conceptually, the action starts as soon as the dispatch is called, even if the action is queued until earlier ones finish. We will also warn if an async action is dispatched outside of a transition, since that is almost certainly a mistake. Ideally we would automatically upgrade these to a transition, but we don't have a great way to tell if the action is async until after it's already run. DiffTrain build for commit https://github.com/facebook/react/commit/67b05be0d216c4efebc4bb5acb12c861a18bd87c.