Basic Phoenix example not working without Javascript

Thanks for your answer and pointing me to phoenix_html.js!

I understand that it would not work outside of forms, my suggestion would rather be to wrap the button with a form right in the template as HTML, not with JS after page load. Is there a reason why Phoenix decided to do it with JS?

This is the way some newer JS frameworks like Remix do it, getting the benefits of a progressive UX - as in everything works without JS from the first load, then it gets enhanced.

It might not be a big deal, but I believe these things could matter to other people like me who came to Phoenix after getting tired of the JS drama. T