News for hackers. Stuff that matters.
Re:Django, HTMX and Alpine.js: Modern websites, JavaScript o... by EugeneOZ on Wednesday November 24, 2021 @01:54AM (#29327550)
Button should not have any behavior, it should generate an event. Your app can have one or multiple listeners for this event. This pattern is battle-tested for decades.
Re:Django, HTMX and Alpine.js: Modern websites, JavaScript o... by recursivedoubts on Thursday November 25, 2021 @11:20AM (#29342563)
OK, but the response to that event should be localized to the button.

https://htmx.org/essays/locality-of-behaviour/

Re:Django, HTMX and Alpine.js: Modern websites, JavaScript o... by JasonCannon on Wednesday November 24, 2021 @03:33AM (#29328000)
Why? Have any reading on this?
Re:Django, HTMX and Alpine.js: Modern websites, JavaScript o... by EugeneOZ on Wednesday November 24, 2021 @03:52AM (#29328117)
Re:Django, HTMX and Alpine.js: Modern websites, JavaScript o... by JasonCannon on Wednesday November 24, 2021 @01:18PM (#29333208)
1.) Don't be a jackass.

2.) I know what reactive programming is, I make extensive use of RxJS at work. And I obviously know what an event listener is. I was asking why is it wrong to have the button have functionality and only emit events. And I did google that, but nothing from your comment you posted that I googled lead to anything about reactive programming.