You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This exposes, but does not yet implement, a new experimental API called
useFormState. It's gated behind the enableAsyncActions flag.
useFormState has a similar signature to useReducer, except instead of a
reducer it accepts an (async) action function. React will wait until the
promise resolves before updating the state:
```js
async function action(prevState, payload) {
// ..
}
const [state, dispatch] = useFormState(action, initialState)
```
When used in combination with Server Actions, it will also support
progressive enhancement — a form that is submitted before it has
hydrated will have its state transferred to the next page. However, like
the other action-related hooks, it works with fully client-driven
actions, too.
DiffTrain build for commit b4cdd3e.
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -23977,7 +23977,7 @@ function createFiberRoot(
23977
23977
return root;
23978
23978
}
23979
23979
23980
-
var ReactVersion = "18.3.0-canary-856dc5e43-20230822";
23980
+
var ReactVersion = "18.3.0-canary-b4cdd3e89-20230823";
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -8612,7 +8612,7 @@ var devToolsConfig$jscomp$inline_1029 = {
8612
8612
throwError("TestRenderer does not support findFiberByHostInstance()");
8613
8613
},
8614
8614
bundleType: 0,
8615
-
version: "18.3.0-canary-856dc5e43-20230822",
8615
+
version: "18.3.0-canary-b4cdd3e89-20230823",
8616
8616
rendererPackageName: "react-test-renderer"
8617
8617
};
8618
8618
varinternals$jscomp$inline_1228={
@@ -8643,7 +8643,7 @@ var internals$jscomp$inline_1228 = {
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9038,7 +9038,7 @@ var devToolsConfig$jscomp$inline_1071 = {
9038
9038
throwError("TestRenderer does not support findFiberByHostInstance()");
9039
9039
},
9040
9040
bundleType: 0,
9041
-
version: "18.3.0-canary-856dc5e43-20230822",
9041
+
version: "18.3.0-canary-b4cdd3e89-20230823",
9042
9042
rendererPackageName: "react-test-renderer"
9043
9043
};
9044
9044
varinternals$jscomp$inline_1269={
@@ -9069,7 +9069,7 @@ var internals$jscomp$inline_1269 = {
0 commit comments