Skip to content

Commit

Permalink
s/form state/action state (#28631)
Browse files Browse the repository at this point in the history
Rename internals from "form state" to "action state"
  • Loading branch information
rickhanlonii authored Mar 28, 2024
1 parent 299a9c0 commit 05797cc
Show file tree
Hide file tree
Showing 8 changed files with 116 additions and 113 deletions.
4 changes: 2 additions & 2 deletions packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6187,8 +6187,8 @@ describe('ReactDOMFizzServer', () => {
// Because of the render phase update above, this component is evaluated
// multiple times (even during SSR), but it should only emit a single
// marker per useActionState instance.
const [formState] = useActionState(action, 0);
const text = `${readText('Child')}:${formState}:${localState}`;
const [actionState] = useActionState(action, 0);
const text = `${readText('Child')}:${actionState}:${localState}`;
return (
<div id="child" ref={childRef}>
{text}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/src/__tests__/ReactDOMForm-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@ describe('ReactDOMForm', () => {
});

// @gate enableAsyncActions
test('useFormState works in StrictMode', async () => {
test('useActionState works in StrictMode', async () => {
let actionCounter = 0;
async function action(state, type) {
actionCounter++;
Expand Down
Loading

0 comments on commit 05797cc

Please sign in to comment.