dillon1000/react

Commit

useFormState's permalink option changes form target (#27302)

When the `permalink` option is passed to `useFormState`, and the form is
submitted before it has hydrated, the permalink will be used as the
target of the form action, enabling MPA-style form submissions.

(Note that submitting a form without hydration is a feature of Server
Actions; it doesn't work with regular client actions.)

It does not have any effect after the form has hydrated.
Browse files
Changed paths5 files
First-parent comparison
M packages/react-dom-bindings/src/shared/ReactDOMFormActions.js ModifiedM packages/react-reconciler/src/ReactFiberHooks.js ModifiedM packages/react-reconciler/src/ReactInternalTypes.js ModifiedM packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMForm-test.js ModifiedM packages/react-server/src/ReactFizzHooks.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…