540bab085d
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. |
||
---|---|---|
.. | ||
npm | ||
src | ||
README.md | ||
flight-client.js | ||
flight-modules.js | ||
flight-server.js | ||
index.js | ||
package.json | ||
persistent.js | ||
server.js |
README.md
react-noop-renderer
This package is the renderer we use for debugging Fiber. It is not intended to be used directly.