Home / File/ SolidCounter.tsx — astro Source File

SolidCounter.tsx — astro Source File

Architecture documentation for SolidCounter.tsx, a tsx file in the astro codebase. 1 imports, 0 dependents.

File tsx E2ETesting TestFixtures 1 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  fdf6c01e_cd29_d764_ff7f_ba193bb89e83["SolidCounter.tsx"]
  5458ee59_7908_bf35_f257_ad630e4e60d7["solid-js"]
  fdf6c01e_cd29_d764_ff7f_ba193bb89e83 --> 5458ee59_7908_bf35_f257_ad630e4e60d7
  style fdf6c01e_cd29_d764_ff7f_ba193bb89e83 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { createSignal } from 'solid-js';

/** a counter written with Solid */
export default function SolidCounter({ children, id }) {
	const [count, setCount] = createSignal(0);
	const add = () => setCount(count() + 1);
	const subtract = () => setCount(count() - 1);

	return (
			<div id={id} class="counter">
				<button class="decrement" onClick={subtract}>-</button>
				<pre>{count()}</pre>
				<button class="increment" onClick={add}>+</button>
				<div class="children">{children}</div>
			</div>
	);
}

Domain

Subdomains

Functions

Dependencies

  • solid-js

Frequently Asked Questions

What does SolidCounter.tsx do?
SolidCounter.tsx is a source file in the astro codebase, written in tsx. It belongs to the E2ETesting domain, TestFixtures subdomain.
What functions are defined in SolidCounter.tsx?
SolidCounter.tsx defines 1 function(s): SolidCounter.
What does SolidCounter.tsx depend on?
SolidCounter.tsx imports 1 module(s): solid-js.
Where is SolidCounter.tsx in the architecture?
SolidCounter.tsx is located at packages/astro/e2e/fixtures/client-only/src/components/solid/SolidCounter.tsx (domain: E2ETesting, subdomain: TestFixtures, directory: packages/astro/e2e/fixtures/client-only/src/components/solid).

Analyze Your Own Codebase

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

Try Supermodel Free