Yeah I know “a” isn’t a valid email address, but let me finish typing lol.
This is for everyone. Please, please leave HTML form behavior alone as much as possible. Whatever it is you’re changing, you’re probably wrong.
Yeah I know “a” isn’t a valid email address, but let me finish typing lol.
This is for everyone. Please, please leave HTML form behavior alone as much as possible. Whatever it is you’re changing, you’re probably wrong.
Admittedly, anecdotal, but most of the guys in my career who have been really into UI = f(state) only consider the validated state, and wish the stuff that’s purely user input and never sent to your backend would just go away.
And when you consider that state is both what you want to send to the server, and a bunch of intermediate state that only ever means something to the client, the UI = f(state) idea (while true!) doesn’t seem all that helpful. Technically every app is a function of state, but if your definition of state is that broad what help is the idea?
What I don’t care about is if the state is from a prop, a value inside a DOM object, a global…
If I have to know where the state comes from, the code is smelly