Tag · 1 post
javascript
-
Engineering 7 min
Why I Don't Trust the Submit Button ToggleThe day I stopped writing classList.toggle('enabled') around an async submit and started deriving the button's state from the form. A walk through why toggle is a weaker promise than set — and why even set is wrong, just more slowly.