PCounter.jsx — astro Source File
Architecture documentation for PCounter.jsx, a javascript file in the astro codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR ec2f7e5e_9586_542f_2929_2947c83e655c["PCounter.jsx"] 0fef379e_25c0_6f95_11fd_6d0f7db42b7e["preact"] ec2f7e5e_9586_542f_2929_2947c83e655c --> 0fef379e_25c0_6f95_11fd_6d0f7db42b7e c842527d_3bf8_8183_b0c5_b57319266e7f["hooks"] ec2f7e5e_9586_542f_2929_2947c83e655c --> c842527d_3bf8_8183_b0c5_b57319266e7f style ec2f7e5e_9586_542f_2929_2947c83e655c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { h } from 'preact';
import { useState } from 'preact/hooks';
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
- hooks
- preact
Source
Frequently Asked Questions
What does PCounter.jsx do?
PCounter.jsx is a source file in the astro codebase, written in javascript. It belongs to the IntegrationAdapters domain, ReactIntegration subdomain.
What functions are defined in PCounter.jsx?
PCounter.jsx defines 1 function(s): Counter.
What does PCounter.jsx depend on?
PCounter.jsx imports 2 module(s): hooks, preact.
Where is PCounter.jsx in the architecture?
PCounter.jsx is located at packages/astro/test/fixtures/static-build-frameworks/src/components/PCounter.jsx (domain: IntegrationAdapters, subdomain: ReactIntegration, directory: packages/astro/test/fixtures/static-build-frameworks/src/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free