Course lesson
Treat zod Schemas as Single Source of Truth
In this lesson we learn that the zod schemas become the single source of truth.
- Duration
- 5 min
- Access
- Included
- Transcript
- Needs source
In this lesson we learn that the zod schemas become the single source of truth.
We shall not update TypeScript types manually, since they are generated automatically from the schema.
Same with validation functions.
Whenever the schema changes, all the rest will update accordingly. It's an important mind shift.