(no title)
de46le | 1 year ago
<button form="logout-form" ...>logout</button>
<form name="logout-form"></form>
No layout implications that way, barring any nth-child css (solvable by putting the form somewhere else). Doesn't solve the form being limited to GET/POST, but styling concerns are atleast handled.
recursivedoubts|1 year ago
de46le|1 year ago
Though in my experience, it's great in frameworks like svelte. Define your forms at the top of the component, and you can see at a glance what native actions the component can do, and where it posts to.