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 53555133_e38d_0a4d_1088_d1ddbcf576ed["Counter.jsx"] 57aaf20c_5193_2fda_b993_4c6e0db3df11["Counter.css"] 53555133_e38d_0a4d_1088_d1ddbcf576ed --> 57aaf20c_5193_2fda_b993_4c6e0db3df11 0fef379e_25c0_6f95_11fd_6d0f7db42b7e["preact"] 53555133_e38d_0a4d_1088_d1ddbcf576ed --> 0fef379e_25c0_6f95_11fd_6d0f7db42b7e c842527d_3bf8_8183_b0c5_b57319266e7f["hooks"] 53555133_e38d_0a4d_1088_d1ddbcf576ed --> c842527d_3bf8_8183_b0c5_b57319266e7f style 53555133_e38d_0a4d_1088_d1ddbcf576ed fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { h } from 'preact';
import { useState } from 'preact/hooks';
import './Counter.css';
export default function Counter({ children }) {
const [count, setCount] = useState(0);
const add = () => setCount((i) => i + 1);
const subtract = () => setCount((i) => i - 1);
return (
<>
<div class="counter">
<button onClick={subtract}>-</button>
<pre>{count}</pre>
<button onClick={add}>+</button>
</div>
<div class="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 IntegrationAdapters domain, SsrAdapters 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/test/fixtures/component-library-shared/Counter.jsx (domain: IntegrationAdapters, subdomain: SsrAdapters, directory: packages/astro/test/fixtures/component-library-shared).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free