Button.js — react Source File
Architecture documentation for Button.js, a javascript file in the react codebase. 4 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 3c19db13_4295_a35d_8429_d706204acf47["Button.js"] a595a180_8a71_e4db_574e_528cf2694d32["ErrorBoundary.js"] 3c19db13_4295_a35d_8429_d706204acf47 --> a595a180_8a71_e4db_574e_528cf2694d32 8732d52d_5060_60c1_05ce_86cacb9a7509["ErrorBoundary"] 3c19db13_4295_a35d_8429_d706204acf47 --> 8732d52d_5060_60c1_05ce_86cacb9a7509 ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] 3c19db13_4295_a35d_8429_d706204acf47 --> ac587885_e294_a1e9_b13f_5e7b920fdb42 4d0c4ccc_5970_e7f9_458f_15f0290099b1["react-dom"] 3c19db13_4295_a35d_8429_d706204acf47 --> 4d0c4ccc_5970_e7f9_458f_15f0290099b1 eef5c2d6_5cd1_257d_9f3d_8561e1cce25f["App.js"] eef5c2d6_5cd1_257d_9f3d_8561e1cce25f --> 3c19db13_4295_a35d_8429_d706204acf47 style 3c19db13_4295_a35d_8429_d706204acf47 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
'use client';
import * as React from 'react';
import {useFormStatus} from 'react-dom';
import ErrorBoundary from './ErrorBoundary.js';
const h = React.createElement;
function ButtonDisabledWhilePending({action, children}) {
const {pending} = useFormStatus();
return h(
'button',
{
disabled: pending,
formAction: action,
},
children
);
}
export default function Button({action, children}) {
return h(
ErrorBoundary,
null,
h(
'form',
null,
h(
ButtonDisabledWhilePending,
{
action: action,
},
children
)
)
);
}
Domain
Subdomains
Functions
Dependencies
- ErrorBoundary
- ErrorBoundary.js
- react
- react-dom
Imported By
Source
Frequently Asked Questions
What does Button.js do?
Button.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Entrypoint subdomain.
What functions are defined in Button.js?
Button.js defines 2 function(s): Button, ButtonDisabledWhilePending.
What does Button.js depend on?
Button.js imports 4 module(s): ErrorBoundary, ErrorBoundary.js, react, react-dom.
What files import Button.js?
Button.js is imported by 1 file(s): App.js.
Where is Button.js in the architecture?
Button.js is located at fixtures/flight-esm/src/Button.js (domain: BabelCompiler, subdomain: Entrypoint, directory: fixtures/flight-esm/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free