Counter() — astro Function Reference
Architecture documentation for the Counter() function in ReactCounter.jsx from the astro codebase.
Entity Profile
Dependency Diagram
graph TD a895b26c_175e_7044_50ea_1187be995c48["Counter()"] e7b4d215_1bfa_f129_ea93_393780afa246["ReactCounter.jsx"] a895b26c_175e_7044_50ea_1187be995c48 -->|defined in| e7b4d215_1bfa_f129_ea93_393780afa246 style a895b26c_175e_7044_50ea_1187be995c48 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/e2e/fixtures/nested-in-vue/src/components/react/ReactCounter.jsx lines 4–17
export function Counter({ children, id }) {
const [count, setCount] = useState(0);
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 id={`${id}-count`}>{count}</pre>
<button id={`${id}-increment`} className="increment" onClick={add}>+</button>
<div className="children">{children}</div>
</div>
);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does Counter() do?
Counter() is a function in the astro codebase, defined in packages/astro/e2e/fixtures/nested-in-vue/src/components/react/ReactCounter.jsx.
Where is Counter() defined?
Counter() is defined in packages/astro/e2e/fixtures/nested-in-vue/src/components/react/ReactCounter.jsx at line 4.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free