wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
12.7k stars 1.13k forks source link

When defining user signup fields, support setting them all in one function at the same time #2109

Open Martinsos opened 1 week ago

Martinsos commented 1 week ago

Right now you have to define one function per each field, and each function received the same data, that came from Google or Github or whatever. However, that means that you might need to replicate some logic between these functions, like parsing that data with zod. What would probably make more sense is to instead have them provide a single function that then returns an object containing all the fields. There would be less boilerplate (1 vs N functions) and they could reuse code while doing that.