react/packages/react-noop-renderer
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
..
npm Remove Blocks (#20138) 2020-10-30 23:03:45 -07:00
src Implement experimental_useFormStatus (#26722) 2023-04-26 18:19:58 -04:00
README.md Add Fiber Debugger (#8033) 2016-10-25 08:36:37 +01:00
flight-client.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
flight-modules.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
flight-server.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
index.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
package.json Remove object-assign polyfill (#23351) 2022-02-23 19:34:24 -05:00
persistent.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
server.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00

README.md

react-noop-renderer

This package is the renderer we use for debugging Fiber. It is not intended to be used directly.