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 CoreAstro RenderingEngine 1 imports 1 functions

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

/** @jsxImportSource solid-js */

import { createSignal, type JSX } from 'solid-js';

/** A counter written with Solid */
export default function SolidCounter(props: { children?: JSX.Element }) {
	const [count, setCount] = createSignal(0);
	const add = () => setCount(count() + 1);
	const subtract = () => setCount(count() - 1);

	return (
		<>
			<div id="solid" class="counter">
				<button onClick={subtract}>-</button>
				<pre>{count()}</pre>
				<button onClick={add}>+</button>
			</div>
			<div class="counter-message">{props.children}</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 CoreAstro domain, RenderingEngine 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 examples/framework-multiple/src/components/solid/SolidCounter.tsx (domain: CoreAstro, subdomain: RenderingEngine, directory: examples/framework-multiple/src/components/solid).

Analyze Your Own Codebase

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

Try Supermodel Free