Home / Function/ LikeWithActionState() — astro Function Reference

LikeWithActionState() — astro Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  f409683b_1670_6999_206d_a495d36dd5ef["LikeWithActionState()"]
  3c178090_18e6_e3c8_db1a_00145f9b8154["Like.tsx"]
  f409683b_1670_6999_206d_a495d36dd5ef -->|defined in| 3c178090_18e6_e3c8_db1a_00145f9b8154
  style f409683b_1670_6999_206d_a495d36dd5ef fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/e2e/fixtures/actions-react-19/src/components/Like.tsx lines 16–28

export function LikeWithActionState({ postId, label, likes: initial }: { postId: string; label: string; likes: number }) {
	const [likes, action] = useActionState(
		withState(actions.blog.likeWithActionState),
		{ data: initial },
	);

	return (
		<form action={action}>
			<input type="hidden" name="postId" value={postId} />
			<Button likes={likes.data} label={label} />
		</form>
	);
}

Domain

Subdomains

Frequently Asked Questions

What does LikeWithActionState() do?
LikeWithActionState() is a function in the astro codebase, defined in packages/astro/e2e/fixtures/actions-react-19/src/components/Like.tsx.
Where is LikeWithActionState() defined?
LikeWithActionState() is defined in packages/astro/e2e/fixtures/actions-react-19/src/components/Like.tsx at line 16.

Analyze Your Own Codebase

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

Try Supermodel Free