react hook form1 간단하게 사용해보는 React Hook Form & zod (useFieldArray) "use client";import React from "react";import { zodResolver } from "@hookform/resolvers/zod";import { useFieldArray, useForm } from "react-hook-form";import { z } from "zod";type Props = {};type FormValues = { testObj: { name: string; gender: string; }; pets: { name: string; species: string }[];};const formSchema = z.object({ testObj: z.object({ name: z.string().min(1, "이름은 필수입니다.").. Web/React 2024. 11. 7. 이전 1 다음