dillon1000/react

Commit

Add stub for experimental_useFormStatus (#26719)

This wires up, but does not yet implement, an experimental hook called
useFormStatus. The hook is imported from React DOM, not React, because
it represents DOM-specific state — its return type includes FormData as
one of its fields. Other renderers that implement similar methods would
use their own renderer-specific types.

The API is prefixed and only available in the experimental channel.

It can only be used from client (browser, SSR) components, not Server
Components.
Browse files
Changed paths8 files
First-parent comparison
M packages/react-dom/index.classic.fb.js ModifiedM packages/react-dom/index.experimental.js ModifiedM packages/react-dom/index.js ModifiedM packages/react-dom/index.modern.fb.js ModifiedA packages/react-dom/src/ReactDOMFormActions.js AddedM packages/react-dom/src/__tests__/ReactDOMFizzForm-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMForm-test.js ModifiedM packages/react-dom/src/client/ReactDOM.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…