Is it a bad practice for a sign up form to use both `onSubmit` and `action`?
Unanswered
American Wirehair posted this in #help-forum
American WirehairOP
I am manually building a sign-up form component where all of my auth logic lies in a python long-running server on the backend. I'd like to do basic client-side validation like passwords are the same, etc. If the form looks good, I want to execute a Next.JS Server action and then my server-side on next.js will communicate with my python backend app and it's auth code exposed via some API.
Sources: https://stackoverflow.com/questions/74931828/can-someone-explain-the-difference-between-onsubmit-and-action
The top answer on this post says "Generally, you don't want to use both at the same time..." but I don't understand their reasoning for why you should not use both.
Sources: https://stackoverflow.com/questions/74931828/can-someone-explain-the-difference-between-onsubmit-and-action
The top answer on this post says "Generally, you don't want to use both at the same time..." but I don't understand their reasoning for why you should not use both.