`<button onclick="this.classList.add('bg-green')">`
Encouraged? Huh? We spent YEARS splitting logic from presentation and not describing presentation with visual characteristics.
This is a terrible idea.
Encouraged? Huh? We spent YEARS splitting logic from presentation and not describing presentation with visual characteristics.
This is a terrible idea.
I've been told by quite a few Tailwind users that they much prefer it because it bring styling and markup into the same place. In their view markup and styling are so linked that splitting the code up is painful to follow and maintain. This onclick example follows the exact same argument, that the click handler is so tied to the markup that it should be inline.