Add stub for experimental_useFormStatus#26719
Conversation
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.
|
Comparing: 5e5342b...663e13a Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
| unstable_createEventHandle, | ||
| unstable_renderSubtreeIntoContainer, | ||
| unstable_runWithPriority, // DO NOT USE: Temporarily exposed to migrate off of Scheduler.runWithPriority. | ||
| useFormStatus as experimental_useFormStatus, |
There was a problem hiding this comment.
Just noticing that the form flag is on in www but not the async transitions one so it's kind of a useless combination for this export.
There was a problem hiding this comment.
Yeah I intentionally kept the async one off because it affects error handling behavior even in regular, sync useTransition. Should we turn enableFormActions off too?
There was a problem hiding this comment.
Yea, let's do that for now.
There was a problem hiding this comment.
If we turn them on we have to also update this to get the right external runtime from experimental or make an fb build.
https://github.com/facebook/react/blob/main/.github/workflows/commit_artifacts.yml#L137-L138
There was a problem hiding this comment.
Ok I opened a separate PR where we can discuss: #26721
This was an oversight when I set up the hook in facebook#26719
This was an oversight when I set up the hook in #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.
This was an oversight when I set up the hook in facebook#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. DiffTrain build for commit 919620b.
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.