3 ms·
React doesn’t require you to both abandon the principles of the library and write an inline string of code to run something slightly custom when you click a but
by robertoandred 2y ago
React doesn’t require you to both abandon the principles of the library and write an inline string of code to run something slightly custom when you click a button.
- yawaramin 2y agohtmx doesn't require you to write inline code in strings either, it's just a convenient compact way to do it in a demo. Also, it's not 'abandoning' any 'principles' because the 'principle' is to leverage small bits of JavaScript in a high-impact way. Eg, https://dev.to/yawaramin/handling-form-errors-in-htmx-3ncg https://dev.to/yawaramin/handling-form-errors-in-htmx-3ncg
- robertoandred 2y agoSo where else will you put this code? A separate file? Multiple files? Maybe specific files for specific bits of UI? Maybe then you’ll need to handle bundling, transpiling, minification? Oops, we’re back to an evil pile of JS code that needs to be built.
- yawaramin 2y agoNot really? HTTP/2 and ES Modules exist now, lol. And so does brotli compression done by my CDN. Bundling/transpiling/minification are basically obsolete technologies.