Skip to content

Commit c4621aa

Browse files
committed
s/form state/action state
1 parent 5a75f9e commit c4621aa

File tree

11 files changed

+122
-113
lines changed

11 files changed

+122
-113
lines changed

packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,12 +1819,14 @@ function injectFormReplayingRuntime(
18191819
const formStateMarkerIsMatching = stringToPrecomputedChunk('<!--F!-->');
18201820
const formStateMarkerIsNotMatching = stringToPrecomputedChunk('<!--F-->');
18211821

1822+
// TODO: rename to pushActionState?
18221823
export function pushFormStateMarkerIsMatching(
18231824
target: Array<Chunk | PrecomputedChunk>,
18241825
) {
18251826
target.push(formStateMarkerIsMatching);
18261827
}
18271828

1829+
// TODO: rename to pushActionState?
18281830
export function pushFormStateMarkerIsNotMatching(
18291831
target: Array<Chunk | PrecomputedChunk>,
18301832
) {

packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6208,8 +6208,8 @@ describe('ReactDOMFizzServer', () => {
62086208
// Because of the render phase update above, this component is evaluated
62096209
// multiple times (even during SSR), but it should only emit a single
62106210
// marker per useActionState instance.
6211-
const [formState] = useActionState(action, 0);
6212-
const text = `${readText('Child')}:${formState}:${localState}`;
6211+
const [actionState] = useActionState(action, 0);
6212+
const text = `${readText('Child')}:${actionState}:${localState}`;
62136213
return (
62146214
<div id="child" ref={childRef}>
62156215
{text}

packages/react-dom/src/__tests__/ReactDOMForm-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ describe('ReactDOMForm', () => {
12801280
});
12811281

12821282
// @gate enableAsyncActions
1283-
test('useFormState works in StrictMode', async () => {
1283+
test('useActionState works in StrictMode', async () => {
12841284
let actionCounter = 0;
12851285
async function action(state, type) {
12861286
actionCounter++;

0 commit comments

Comments
 (0)