Skip to content

Commit

Permalink
Upgrade Server Actions to canary (#27459)
Browse files Browse the repository at this point in the history
Upgrades the stability of Server Actions from experimental to canary.

- Turns on enableAsyncActions and enableFormActions
- Removes "experimental_" prefix from useOptimistic, useFormStatus, and
useFormState

DiffTrain build for [bfefb22](bfefb22)
  • Loading branch information
acdlite committed Oct 4, 2023
1 parent 3dcc034 commit b0d9923
Show file tree
Hide file tree
Showing 20 changed files with 1,672 additions and 121 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
88d56b8e818d0c48eb6642303169c1fadeb99d59
bfefb228422f7264a29b3a6b98ec95e05925e80e
4 changes: 2 additions & 2 deletions compiled/facebook-www/React-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-www-classic-f9aace21";
var ReactVersion = "18.3.0-www-classic-f4ae0982";

// ATTENTION
// When adding new symbols to this file,
Expand Down Expand Up @@ -4167,7 +4167,6 @@ exports.createFactory = createFactory;
exports.createRef = createRef;
exports.createServerContext = createServerContext;
exports.experimental_useEffectEvent = useEffectEvent;
exports.experimental_useOptimistic = useOptimistic;
exports.forwardRef = forwardRef;
exports.isValidElement = isValidElement$1;
exports.jsx = jsx;
Expand Down Expand Up @@ -4199,6 +4198,7 @@ exports.useImperativeHandle = useImperativeHandle;
exports.useInsertionEffect = useInsertionEffect;
exports.useLayoutEffect = useLayoutEffect;
exports.useMemo = useMemo;
exports.useOptimistic = useOptimistic;
exports.useReducer = useReducer;
exports.useRef = useRef;
exports.useState = useState;
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-www-modern-3b1c1c68";
var ReactVersion = "18.3.0-www-modern-06b61106";

// ATTENTION
// When adding new symbols to this file,
Expand Down Expand Up @@ -4131,7 +4131,6 @@ exports.createElement = createElement;
exports.createRef = createRef;
exports.createServerContext = createServerContext;
exports.experimental_useEffectEvent = useEffectEvent;
exports.experimental_useOptimistic = useOptimistic;
exports.forwardRef = forwardRef;
exports.isValidElement = isValidElement$1;
exports.jsx = jsx;
Expand Down Expand Up @@ -4162,6 +4161,7 @@ exports.useImperativeHandle = useImperativeHandle;
exports.useInsertionEffect = useInsertionEffect;
exports.useLayoutEffect = useLayoutEffect;
exports.useMemo = useMemo;
exports.useOptimistic = useOptimistic;
exports.useReducer = useReducer;
exports.useRef = useRef;
exports.useState = useState;
Expand Down
8 changes: 4 additions & 4 deletions compiled/facebook-www/React-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,6 @@ exports.createServerContext = function (globalName, defaultValue) {
exports.experimental_useEffectEvent = function (callback) {
return ReactCurrentDispatcher.current.useEffectEvent(callback);
};
exports.experimental_useOptimistic = function (passthrough, reducer) {
return ReactCurrentDispatcher.current.useOptimistic(passthrough, reducer);
};
exports.forwardRef = function (render) {
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
};
Expand Down Expand Up @@ -600,6 +597,9 @@ exports.useLayoutEffect = function (create, deps) {
exports.useMemo = function (create, deps) {
return ReactCurrentDispatcher.current.useMemo(create, deps);
};
exports.useOptimistic = function (passthrough, reducer) {
return ReactCurrentDispatcher.current.useOptimistic(passthrough, reducer);
};
exports.useReducer = function (reducer, initialArg, init) {
return ReactCurrentDispatcher.current.useReducer(reducer, initialArg, init);
};
Expand All @@ -623,4 +623,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-www-classic-03d59dfb";
exports.version = "18.3.0-www-classic-6920e6db";
8 changes: 4 additions & 4 deletions compiled/facebook-www/React-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,6 @@ exports.createServerContext = function (globalName, defaultValue) {
exports.experimental_useEffectEvent = function (callback) {
return ReactCurrentDispatcher.current.useEffectEvent(callback);
};
exports.experimental_useOptimistic = function (passthrough, reducer) {
return ReactCurrentDispatcher.current.useOptimistic(passthrough, reducer);
};
exports.forwardRef = function (render) {
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
};
Expand Down Expand Up @@ -592,6 +589,9 @@ exports.useLayoutEffect = function (create, deps) {
exports.useMemo = function (create, deps) {
return ReactCurrentDispatcher.current.useMemo(create, deps);
};
exports.useOptimistic = function (passthrough, reducer) {
return ReactCurrentDispatcher.current.useOptimistic(passthrough, reducer);
};
exports.useReducer = function (reducer, initialArg, init) {
return ReactCurrentDispatcher.current.useReducer(reducer, initialArg, init);
};
Expand All @@ -615,4 +615,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-www-modern-12525118";
exports.version = "18.3.0-www-modern-9af4f539";
8 changes: 4 additions & 4 deletions compiled/facebook-www/React-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,6 @@ exports.createServerContext = function (globalName, defaultValue) {
exports.experimental_useEffectEvent = function (callback) {
return ReactCurrentDispatcher.current.useEffectEvent(callback);
};
exports.experimental_useOptimistic = function (passthrough, reducer) {
return ReactCurrentDispatcher.current.useOptimistic(passthrough, reducer);
};
exports.forwardRef = function (render) {
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
};
Expand Down Expand Up @@ -611,6 +608,9 @@ exports.useLayoutEffect = function (create, deps) {
exports.useMemo = function (create, deps) {
return ReactCurrentDispatcher.current.useMemo(create, deps);
};
exports.useOptimistic = function (passthrough, reducer) {
return ReactCurrentDispatcher.current.useOptimistic(passthrough, reducer);
};
exports.useReducer = function (reducer, initialArg, init) {
return ReactCurrentDispatcher.current.useReducer(reducer, initialArg, init);
};
Expand All @@ -634,7 +634,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-www-classic-309fcb47";
exports.version = "18.3.0-www-classic-fce6281b";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
8 changes: 4 additions & 4 deletions compiled/facebook-www/React-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,6 @@ exports.createServerContext = function (globalName, defaultValue) {
exports.experimental_useEffectEvent = function (callback) {
return ReactCurrentDispatcher.current.useEffectEvent(callback);
};
exports.experimental_useOptimistic = function (passthrough, reducer) {
return ReactCurrentDispatcher.current.useOptimistic(passthrough, reducer);
};
exports.forwardRef = function (render) {
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
};
Expand Down Expand Up @@ -603,6 +600,9 @@ exports.useLayoutEffect = function (create, deps) {
exports.useMemo = function (create, deps) {
return ReactCurrentDispatcher.current.useMemo(create, deps);
};
exports.useOptimistic = function (passthrough, reducer) {
return ReactCurrentDispatcher.current.useOptimistic(passthrough, reducer);
};
exports.useReducer = function (reducer, initialArg, init) {
return ReactCurrentDispatcher.current.useReducer(reducer, initialArg, init);
};
Expand All @@ -626,7 +626,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-www-modern-fa7e58e7";
exports.version = "18.3.0-www-modern-b51738eb";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -34006,7 +34006,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-www-classic-07a731ef";
var ReactVersion = "18.3.0-www-classic-41a19799";

function createPortal$1(
children,
Expand Down Expand Up @@ -46623,8 +46623,6 @@ assign(Internals, {
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = createPortal;
exports.createRoot = createRoot;
exports.experimental_useFormState = useFormState;
exports.experimental_useFormStatus = useFormStatus;
exports.findDOMNode = findDOMNode;
exports.flushSync = flushSync;
exports.hydrate = hydrate;
Expand All @@ -46641,6 +46639,8 @@ exports.unstable_batchedUpdates = batchedUpdates$1;
exports.unstable_createEventHandle = createEventHandle;
exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;
exports.unstable_runWithPriority = runWithPriority;
exports.useFormState = useFormState;
exports.useFormStatus = useFormStatus;
exports.version = ReactVersion;

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -33851,7 +33851,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-www-modern-6e66ebfa";
var ReactVersion = "18.3.0-www-modern-47efbea5";

function createPortal$1(
children,
Expand Down Expand Up @@ -45691,8 +45691,6 @@ var foundDevTools = injectIntoDevTools({
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = createPortal;
exports.createRoot = createRoot;
exports.experimental_useFormState = useFormState;
exports.experimental_useFormStatus = useFormStatus;
exports.flushSync = flushSync;
exports.hydrateRoot = hydrateRoot;
exports.preconnect = preconnect;
Expand All @@ -45704,6 +45702,8 @@ exports.preloadModule = preloadModule;
exports.unstable_batchedUpdates = batchedUpdates$1;
exports.unstable_createEventHandle = createEventHandle;
exports.unstable_runWithPriority = runWithPriority;
exports.useFormState = useFormState;
exports.useFormStatus = useFormStatus;
exports.version = ReactVersion;

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
Expand Down
18 changes: 9 additions & 9 deletions compiled/facebook-www/ReactDOM-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -16377,7 +16377,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1779 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-8ea1e18c",
version: "18.3.0-www-classic-c9e82eec",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2123 = {
Expand Down Expand Up @@ -16407,7 +16407,7 @@ var internals$jscomp$inline_2123 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-8ea1e18c"
reconcilerVersion: "18.3.0-www-classic-c9e82eec"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2124 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16474,12 +16474,6 @@ exports.createRoot = function (container, options) {
);
return new ReactDOMRoot(options);
};
exports.experimental_useFormState = function () {
throw Error(formatProdErrorMessage(248));
};
exports.experimental_useFormStatus = function () {
throw Error(formatProdErrorMessage(248));
};
exports.findDOMNode = function (componentOrElement) {
if (null == componentOrElement) return null;
if (1 === componentOrElement.nodeType) return componentOrElement;
Expand Down Expand Up @@ -16744,4 +16738,10 @@ exports.unstable_renderSubtreeIntoContainer = function (
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-www-classic-8ea1e18c";
exports.useFormState = function () {
throw Error(formatProdErrorMessage(248));
};
exports.useFormStatus = function () {
throw Error(formatProdErrorMessage(248));
};
exports.version = "18.3.0-www-classic-c9e82eec";
18 changes: 9 additions & 9 deletions compiled/facebook-www/ReactDOM-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -15899,7 +15899,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1738 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-890b0982",
version: "18.3.0-www-modern-012c009e",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2087 = {
Expand Down Expand Up @@ -15930,7 +15930,7 @@ var internals$jscomp$inline_2087 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-890b0982"
reconcilerVersion: "18.3.0-www-modern-012c009e"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2088 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -15990,12 +15990,6 @@ exports.createRoot = function (container, options) {
);
return new ReactDOMRoot(options);
};
exports.experimental_useFormState = function () {
throw Error(formatProdErrorMessage(248));
};
exports.experimental_useFormStatus = function () {
throw Error(formatProdErrorMessage(248));
};
exports.flushSync = function (fn) {
return flushSync$1(fn);
};
Expand Down Expand Up @@ -16195,4 +16189,10 @@ exports.unstable_createEventHandle = function (type, options) {
return eventHandle;
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-www-modern-890b0982";
exports.useFormState = function () {
throw Error(formatProdErrorMessage(248));
};
exports.useFormStatus = function () {
throw Error(formatProdErrorMessage(248));
};
exports.version = "18.3.0-www-modern-012c009e";
18 changes: 9 additions & 9 deletions compiled/facebook-www/ReactDOM-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -17152,7 +17152,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1864 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-76417f33",
version: "18.3.0-www-classic-d075b082",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -17196,7 +17196,7 @@ var devToolsConfig$jscomp$inline_1864 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-76417f33"
reconcilerVersion: "18.3.0-www-classic-d075b082"
});
assign(Internals, {
ReactBrowserEventEmitter: {
Expand Down Expand Up @@ -17250,12 +17250,6 @@ exports.createRoot = function (container, options) {
);
return new ReactDOMRoot(options);
};
exports.experimental_useFormState = function () {
throw Error(formatProdErrorMessage(248));
};
exports.experimental_useFormStatus = function () {
throw Error(formatProdErrorMessage(248));
};
exports.findDOMNode = function (componentOrElement) {
if (null == componentOrElement) return null;
if (1 === componentOrElement.nodeType) return componentOrElement;
Expand Down Expand Up @@ -17520,7 +17514,13 @@ exports.unstable_renderSubtreeIntoContainer = function (
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-www-classic-76417f33";
exports.useFormState = function () {
throw Error(formatProdErrorMessage(248));
};
exports.useFormStatus = function () {
throw Error(formatProdErrorMessage(248));
};
exports.version = "18.3.0-www-classic-d075b082";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
18 changes: 9 additions & 9 deletions compiled/facebook-www/ReactDOM-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -16668,7 +16668,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1823 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-b31f3a02",
version: "18.3.0-www-modern-b2fdc00b",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -16713,7 +16713,7 @@ var devToolsConfig$jscomp$inline_1823 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-b31f3a02"
reconcilerVersion: "18.3.0-www-modern-b2fdc00b"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = function (children, container) {
Expand Down Expand Up @@ -16760,12 +16760,6 @@ exports.createRoot = function (container, options) {
);
return new ReactDOMRoot(options);
};
exports.experimental_useFormState = function () {
throw Error(formatProdErrorMessage(248));
};
exports.experimental_useFormStatus = function () {
throw Error(formatProdErrorMessage(248));
};
exports.flushSync = function (fn) {
return flushSync$1(fn);
};
Expand Down Expand Up @@ -16965,7 +16959,13 @@ exports.unstable_createEventHandle = function (type, options) {
return eventHandle;
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-www-modern-b31f3a02";
exports.useFormState = function () {
throw Error(formatProdErrorMessage(248));
};
exports.useFormStatus = function () {
throw Error(formatProdErrorMessage(248));
};
exports.version = "18.3.0-www-modern-b2fdc00b";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
Loading

0 comments on commit b0d9923

Please sign in to comment.