PreactCounter() — astro Function Reference
Architecture documentation for the PreactCounter() function in PreactCounter.tsx from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 816dabf7_9c1f_168a_2c21_7754a14e0843["PreactCounter()"] a1a04f7a_d832_2980_62d0_950ed10038ab["PreactCounter.tsx"] 816dabf7_9c1f_168a_2c21_7754a14e0843 -->|defined in| a1a04f7a_d832_2980_62d0_950ed10038ab style 816dabf7_9c1f_168a_2c21_7754a14e0843 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/test/fixtures/jsx/src/components/preact/PreactCounter.tsx lines 5–20
export default function PreactCounter() {
const [count, setCount] = useState(0);
const add = () => setCount((i) => i + 1);
const subtract = () => setCount((i) => i - 1);
return (
<div id="preact">
<div className="counter">
<button onClick={subtract}>-</button>
<pre>{count}</pre>
<button onClick={add}>+</button>
</div>
<div className="children">Preact</div>
</div>
);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does PreactCounter() do?
PreactCounter() is a function in the astro codebase, defined in packages/astro/test/fixtures/jsx/src/components/preact/PreactCounter.tsx.
Where is PreactCounter() defined?
PreactCounter() is defined in packages/astro/test/fixtures/jsx/src/components/preact/PreactCounter.tsx at line 5.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free