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