Skip to content

Commit 7a33e9c

Browse files
committed
Update base for Update on "[compiler] Always error on async reassignments"
Summary: Addresses the issue in #30109: any mutation of a local in an async function may occur after rendering has finished. [ghstack-poisoned]
1 parent 5bcc119 commit 7a33e9c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/todo.invalid-nested-function-reassign-local-variable-in-effect.expect.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function Component() {
1111
local = newValue;
1212
};
1313
return reassignLocal;
14-
}
14+
};
1515
const reassignLocal = mk_reassignlocal();
1616
const onMount = (newValue) => {
1717
reassignLocal("hello");

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/todo.invalid-nested-function-reassign-local-variable-in-effect.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function Component() {
77
local = newValue;
88
};
99
return reassignLocal;
10-
}
10+
};
1111
const reassignLocal = mk_reassignlocal();
1212
const onMount = (newValue) => {
1313
reassignLocal("hello");

0 commit comments

Comments
 (0)