Home / File/ Counter.jsx — astro Source File

Counter.jsx — astro Source File

Architecture documentation for Counter.jsx, a javascript file in the astro codebase. 1 imports, 0 dependents.

File javascript 1 imports

Entity Profile

Dependency Diagram

graph LR
  7502ee5b_8fb4_a455_76f2_8b767707db24["Counter.jsx"]
  d9988dd0_c044_f9d2_85cd_a31a0a2bdf80["react"]
  7502ee5b_8fb4_a455_76f2_8b767707db24 --> d9988dd0_c044_f9d2_85cd_a31a0a2bdf80
  style 7502ee5b_8fb4_a455_76f2_8b767707db24 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { useState } from 'react';

export default function ({ initialCount }) {
	const [count, setCount] = useState(initialCount || 0);
	return (
		<div className="rounded-t-lg overflow-hidden border-t border-l border-r border-gray-400 text-center p-4">
			<h2 className="font-semibold text-lg">Counter</h2>
			<h3 className="font-medium text-lg">Count: {count}</h3>
			<button
				className="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"
				onClick={() => setCount(count + 1)}
			>
				Increment
			</button>
		</div>
	);
}

Dependencies

  • react

Frequently Asked Questions

What does Counter.jsx do?
Counter.jsx is a source file in the astro codebase, written in javascript.
What does Counter.jsx depend on?
Counter.jsx imports 1 module(s): react.
Where is Counter.jsx in the architecture?
Counter.jsx is located at examples/container-with-vitest/src/components/Counter.jsx (directory: examples/container-with-vitest/src/components).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free