Counter.jsx — astro Source File
Architecture documentation for Counter.jsx, a javascript file in the astro codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 0966b774_46e8_0649_81ee_30b03d6f3610["Counter.jsx"] 069c808f_9bec_38ab_892f_29108d5815f9["Counter.css"] 0966b774_46e8_0649_81ee_30b03d6f3610 --> 069c808f_9bec_38ab_892f_29108d5815f9 402d0d76_58b5_30aa_876e_4b33bddc8bdc["react"] 0966b774_46e8_0649_81ee_30b03d6f3610 --> 402d0d76_58b5_30aa_876e_4b33bddc8bdc style 0966b774_46e8_0649_81ee_30b03d6f3610 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { useState } from 'react';
import './Counter.css';
export default function Counter({ children, count: initialCount, id }) {
const [count, setCount] = useState(initialCount);
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>{count}</pre>
<button className="increment" onClick={add}>+</button>
</div>
<div className="counter-message">{children}</div>
</>
);
}
Domain
Subdomains
Functions
Dependencies
- Counter.css
- react
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 TestingInfrastructure domain, PlaywrightExtensions subdomain.
What functions are defined in Counter.jsx?
Counter.jsx defines 1 function(s): Counter.
What does Counter.jsx depend on?
Counter.jsx imports 2 module(s): Counter.css, react.
Where is Counter.jsx in the architecture?
Counter.jsx is located at packages/astro/e2e/fixtures/preact-compat-component/src/components/Counter.jsx (domain: TestingInfrastructure, subdomain: PlaywrightExtensions, directory: packages/astro/e2e/fixtures/preact-compat-component/src/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free