Counter.jsx — astro Source File
Architecture documentation for Counter.jsx, a javascript file in the astro codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 333d25df_dcbc_ceac_fba4_f677fa893717["Counter.jsx"] 795912a4_659b_be2d_41ba_1b3fa4ef9add["Counter.css"] 333d25df_dcbc_ceac_fba4_f677fa893717 --> 795912a4_659b_be2d_41ba_1b3fa4ef9add 0fef379e_25c0_6f95_11fd_6d0f7db42b7e["preact"] 333d25df_dcbc_ceac_fba4_f677fa893717 --> 0fef379e_25c0_6f95_11fd_6d0f7db42b7e c842527d_3bf8_8183_b0c5_b57319266e7f["hooks"] 333d25df_dcbc_ceac_fba4_f677fa893717 --> c842527d_3bf8_8183_b0c5_b57319266e7f style 333d25df_dcbc_ceac_fba4_f677fa893717 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { Fragment, h } from 'preact';
import { useState } from 'preact/hooks';
import './Counter.css';
export default function Counter({ children, count: initialCount, id }) {
const [count, setCount] = useState(initialCount);
const add = () => setCount((i) => i + 1);
const subtract = () => setCount((i) => i - 1);
return (
<>
<div id={id} className="counter">
<button className="decrement" onClick={subtract}>-</button>
<pre>{count}</pre>
<button className="increment" onClick={add}>+</button>
</div>
<div className="counter-message">{children}</div>
</>
);
}
Domain
Subdomains
Functions
Dependencies
- Counter.css
- hooks
- preact
Source
Frequently Asked Questions
What does Counter.jsx do?
Counter.jsx is a source file in the astro codebase, written in javascript. It belongs to the E2ETesting domain, TestFixtures subdomain.
What functions are defined in Counter.jsx?
Counter.jsx defines 1 function(s): Counter.
What does Counter.jsx depend on?
Counter.jsx imports 3 module(s): Counter.css, hooks, preact.
Where is Counter.jsx in the architecture?
Counter.jsx is located at packages/astro/e2e/fixtures/preact-component/src/components/Counter.jsx (domain: E2ETesting, subdomain: TestFixtures, directory: packages/astro/e2e/fixtures/preact-component/src/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free