Home / Function/ LikeButton() — astro Function Reference

LikeButton() — astro Function Reference

Architecture documentation for the LikeButton() function in LikeButton.tsx from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  652e6634_360b_14a7_6f05_94f0e4dd175f["LikeButton()"]
  af83e1b1_5bda_f1a9_a972_956c13d50233["LikeButton.tsx"]
  652e6634_360b_14a7_6f05_94f0e4dd175f -->|defined in| af83e1b1_5bda_f1a9_a972_956c13d50233
  style 652e6634_360b_14a7_6f05_94f0e4dd175f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/performance/fixtures/utils/LikeButton.tsx lines 4–11

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

Frequently Asked Questions

What does LikeButton() do?
LikeButton() is a function in the astro codebase, defined in packages/astro/performance/fixtures/utils/LikeButton.tsx.
Where is LikeButton() defined?
LikeButton() is defined in packages/astro/performance/fixtures/utils/LikeButton.tsx at line 4.

Analyze Your Own Codebase

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

Try Supermodel Free