r/reactjs • u/ToshiryuShadow • Oct 24 '26
Needs Help Please help me understand Zod schema transformations
/r/learnprogramming/comments/1xdp1j2/please_help_me_understand_zod_schema/
7
Upvotes
r/reactjs • u/ToshiryuShadow • Oct 24 '26
4
u/SoftwareNegative8783 Oct 24 '26
Your second line parses `task.data`, which is already the output. So it runs through `taskSchema` again, `dueDate` is missing, and `deadline` becomes undefined. Parse the raw input instead.
-1
u/ToshiryuShadow Oct 24 '26
Pls help!
1
u/[deleted] Oct 24 '26
[removed] — view removed comment