Good pattern for sharing schemas between the frontend and backend? #3396
cmaycumber
started this conversation in
Ideas
Replies: 1 comment
-
I think what you're doing is probably just as good as any other approach, IMO for something like this just do what's most convenient for the project - just my 2 cents |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I’m wondering if there’s a generally preferable approach for handling sharing schemas between the frontend and backend? Currently I’m using a monorepo with a shared schema package that sets the zod schemas for use in
react-hook-form
in the frontend and tRPC in the backend.Cuirous if anyone’s come up with a better approach? Maybe a more native solution in tRPC would be preferrable; I imagine this is a common issue/pattern but I’m curious about everyone’s thoughts.
Beta Was this translation helpful? Give feedback.
All reactions