MCPcopy Index your code
hub / github.com/react/react / ButtonDisabledWhilePending

Function ButtonDisabledWhilePending

fixtures/flight/src/Button.js:7–14  ·  view source on GitHub ↗
({action, children})

Source from the content-addressed store, hash-verified

5import ErrorBoundary from './ErrorBoundary.js';
6
7function ButtonDisabledWhilePending({action, children}) {
8 const {pending} = useFormStatus();
9 return (
10 <button disabled={pending} formAction={action}>
11 {children}
12 </button>
13 );
14}
15
16export default function Button({action, children}) {
17 return (

Callers

nothing calls this directly

Calls 1

useFormStatusFunction · 0.90

Tested by

no test coverage detected