export const tagSchema = z.object({ name: z .string({ required_error: "Name is required" }) .min(3, "Name is too short") .max(100, "Name is too long"), }) export type TagSchema = z.infer<typeof tagSchema> 一つポイントを挙げるとすると、このクライアント・サーバー間で使用するスキーマを use-tag-form.ts ファイル内で定義していない点です。 通常、状態管理やクライアントサイドのバリデーション検証を含むフォームコンポーネントはuse clientディレクティブを使用して Client Component として実装されます。同様に、そのコンポーネントで使用されるカスタムフックもクラ
Astro 4.12 is out now! This release includes the first experimental release of Server Islands, our new solution to integrate high performance static HTML and dynamic server-generated components together. Improvements to pagination and syntax highlighting are also included. This release includes the following highlights: Experimental: Server Islands Added first and last URLs to pagination data Adde
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く