react/packages/react-server/src/forks
Andrew Clark 540bab085d
Implement experimental_useFormStatus (#26722)
This hook reads the status of its ancestor form component, if it exists.

```js
const {pending, data, action, method} = useFormStatus();
```

It can be used to implement a loading indicator, for example. You can
think of it as a shortcut for implementing a loading state with the
useTransition hook.

For now, it's only available in the experimental channel. We'll share
docs once its closer to being stable. There are additional APIs that
will ship alongside it.

Internally it's implemented using startTransition + a context object.
That's a good way to think about its behavior, but the actual
implementation details may change in the future.

Because form elements cannot be nested, the implementation in the
reconciler does not bother to keep track of multiple nested "transition
providers". So although it's implemented using generic Fiber config
methods, it does currently make some assumptions based on React DOM's
requirements.
2023-04-26 18:19:58 -04:00
..
ReactFizzConfig.custom.js Implement experimental_useFormStatus (#26722) 2023-04-26 18:19:58 -04:00
ReactFizzConfig.dom-browser.js [Float][Flight] Flight support for Float (#26502) 2023-04-21 20:45:51 -07:00
ReactFizzConfig.dom-bun.js [Float][Flight] Flight support for Float (#26502) 2023-04-21 20:45:51 -07:00
ReactFizzConfig.dom-edge-webpack.js [Float][Flight] Flight support for Float (#26502) 2023-04-21 20:45:51 -07:00
ReactFizzConfig.dom-legacy.js [Float][Flight] Flight support for Float (#26502) 2023-04-21 20:45:51 -07:00
ReactFizzConfig.dom-node-webpack.js [Float][Flight] Flight support for Float (#26502) 2023-04-21 20:45:51 -07:00
ReactFizzConfig.dom-node.js [Float][Flight] Flight support for Float (#26502) 2023-04-21 20:45:51 -07:00
ReactFizzConfig.dom-relay.js [Float][Flight] Flight support for Float (#26502) 2023-04-21 20:45:51 -07:00
ReactFizzConfig.native-relay.js [Float][Flight] Flight support for Float (#26502) 2023-04-21 20:45:51 -07:00
ReactFlightServerConfig.custom.js [Float][Flight] Flight support for Float (#26502) 2023-04-21 20:45:51 -07:00
ReactFlightServerConfig.dom-browser.js [Float][Flight] Flight support for Float (#26502) 2023-04-21 20:45:51 -07:00
ReactFlightServerConfig.dom-bun.js [Float][Flight] Flight support for Float (#26502) 2023-04-21 20:45:51 -07:00
ReactFlightServerConfig.dom-edge-webpack.js [Float][Flight] Flight support for Float (#26502) 2023-04-21 20:45:51 -07:00
ReactFlightServerConfig.dom-legacy.js [Float][Flight] Flight support for Float (#26502) 2023-04-21 20:45:51 -07:00
ReactFlightServerConfig.dom-node-webpack.js [Float][Flight] Flight support for Float (#26502) 2023-04-21 20:45:51 -07:00
ReactFlightServerConfig.dom-node.js [Float][Flight] Flight support for Float (#26502) 2023-04-21 20:45:51 -07:00
ReactFlightServerConfig.dom-relay.js Implements wiring for Flight to have it's own "HostConfig" (#26590) 2023-04-10 14:51:54 -07:00
ReactFlightServerConfig.native-relay.js Normalize ReactFlightServerConfig and related files (#26589) 2023-04-10 14:47:23 -07:00
ReactServerStreamConfig.custom.js [Float][Flight] Flight support for Float (#26502) 2023-04-21 20:45:51 -07:00
ReactServerStreamConfig.dom-browser.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
ReactServerStreamConfig.dom-bun.js Rename "dom" fork to "dom-node" and "bun" fork to "dom-bun" (#26117) 2023-02-06 15:54:14 -05:00
ReactServerStreamConfig.dom-edge-webpack.js Create a bunch of custom webpack vs unbundled node bundles (#26172) 2023-02-16 11:01:52 -05:00
ReactServerStreamConfig.dom-legacy.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
ReactServerStreamConfig.dom-node-webpack.js Create a bunch of custom webpack vs unbundled node bundles (#26172) 2023-02-16 11:01:52 -05:00
ReactServerStreamConfig.dom-node.js Rename "dom" fork to "dom-node" and "bun" fork to "dom-bun" (#26117) 2023-02-06 15:54:14 -05:00
ReactServerStreamConfig.dom-relay.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
ReactServerStreamConfig.native-relay.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00