mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
bf759bd52a9c57a574ffe213efe56161ac47b211
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.
react-fbsource-import
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%