Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 1.33 KB

README.md

File metadata and controls

56 lines (36 loc) · 1.33 KB

Dynamic Forms in React Using Zod and React Hook Form

This project demonstrates how to implement dynamic forms in React using TypeScript, Zod, and React Hook Form. The forms adapt their validation logic based on user input, making it a flexible and powerful tool for handling complex form scenarios.

Features

  • React with TypeScript for strong type safety
  • Vite 5 for fast development and build setup
  • Zod for schema validation and discriminated unions
  • React Hook Form for managing form state and validation
  • Dynamic form inputs like radio button groups and checkboxes
  • Extensible design to support any dynamic form scenario

Getting Started

Prerequisites

  • Node.js version 18 or higher

Installation

  1. Clone the repository:
git clone https://github.com/your-username/your-repo-name.git
  1. Navigate to the project directory:
cd your-repo-name
  1. Install dependencies:
npm install
  1. Start the development server:
npm run dev

Build

To build the project for production:

npm run build

Watch the Tutorial

This project is part of a tutorial available on my YouTube channel, where I walk through the entire process of building dynamic forms with Zod and React Hook Form. Be sure to check it out!