mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Consider dispatch function from useActionState non-reactive (#29917)
Updated version of #29758 removing `useFormState` since that was the previous name for `useActionState`. --------- Co-authored-by: Hieu Do <hieudn.uh@gmail.com>
This commit is contained in:
@@ -15,8 +15,7 @@ import {
|
||||
Place,
|
||||
computePostDominatorTree,
|
||||
getHookKind,
|
||||
isDispatcherType,
|
||||
isSetStateType,
|
||||
isStableType,
|
||||
isUseOperator,
|
||||
} from "../HIR";
|
||||
import { PostDominator } from "../HIR/Dominator";
|
||||
@@ -220,10 +219,7 @@ export function inferReactivePlaces(fn: HIRFunction): void {
|
||||
|
||||
if (hasReactiveInput) {
|
||||
for (const lvalue of eachInstructionLValue(instruction)) {
|
||||
if (
|
||||
isSetStateType(lvalue.identifier) ||
|
||||
isDispatcherType(lvalue.identifier)
|
||||
) {
|
||||
if (isStableType(lvalue.identifier)) {
|
||||
continue;
|
||||
}
|
||||
reactiveIdentifiers.markReactive(lvalue);
|
||||
|
||||
Reference in New Issue
Block a user