From c6a0e5962165bce26dacaffbc58b776ad344f174 Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Sat, 6 May 2023 19:55:24 -0400 Subject: [PATCH] Add useFormStatus to server rendering stub I don't know how to write a test for this. The test I wrote when I implemented the feature passes, which is why I didn't catch this before: https://github.com/facebook/react/blob/efb381bbf981aedbf4eb9e1bd0e6e30abce266d1/packages/react-dom/src/__tests__/ReactDOMFizzForm-test.js#L369-L383 --- packages/react-dom/src/server/ReactDOMServerRenderingStub.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-dom/src/server/ReactDOMServerRenderingStub.js b/packages/react-dom/src/server/ReactDOMServerRenderingStub.js index 29b53d5c51704..ecb46bec0c4a2 100644 --- a/packages/react-dom/src/server/ReactDOMServerRenderingStub.js +++ b/packages/react-dom/src/server/ReactDOMServerRenderingStub.js @@ -8,6 +8,7 @@ */ export {preinit, preload, preconnect, prefetchDNS} from '../ReactDOMFloat'; +export {useFormStatus as experimental_useFormStatus} from 'react-dom-bindings/src/shared/ReactDOMFormActions'; export function createPortal() { throw new Error(