Home / File/ LikeButton.tsx — astro Source File

LikeButton.tsx — astro Source File

Architecture documentation for LikeButton.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
  af83e1b1_5bda_f1a9_a972_956c13d50233["LikeButton.tsx"]
  d9988dd0_c044_f9d2_85cd_a31a0a2bdf80["react"]
  af83e1b1_5bda_f1a9_a972_956c13d50233 --> d9988dd0_c044_f9d2_85cd_a31a0a2bdf80
  style af83e1b1_5bda_f1a9_a972_956c13d50233 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/** @jsxImportSource react */
import { useState } from 'react';

export default function LikeButton({ liked: likedInitial }: {liked: boolean}) {
	const [liked, setLiked] = useState(likedInitial);
	return (
		<button onClick={() => setLiked(!liked)}>
			{!liked ? <span>Like ❤️</span> : <span>Unlike 💔</span>}
		</button>
	)
}

Domain

Subdomains

Functions

Dependencies

  • react

Frequently Asked Questions

What does LikeButton.tsx do?
LikeButton.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 LikeButton.tsx?
LikeButton.tsx defines 1 function(s): LikeButton.
What does LikeButton.tsx depend on?
LikeButton.tsx imports 1 module(s): react.
Where is LikeButton.tsx in the architecture?
LikeButton.tsx is located at packages/astro/performance/fixtures/utils/LikeButton.tsx (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/performance/fixtures/utils).

Analyze Your Own Codebase

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

Try Supermodel Free