So,I guess mixing presentation and logic is OK now? 'Cos as a PHP programmer I used to get shat on all the time for that and I'd like a chance to, you know, unload on someone else for a change. NM, I'll just go back to my cave now.
Hyperscript Tagged Markup: JSX alternative using standard tagged templates
21–30 of 93 posts
Re: Hyperscript Tagged Markup: JSX alternative using standard tagged templates
#22The nice thing about React, vs others like Vue and Angular, is that we've learned not to write code in strings. You'd think this would be a fundamental law of software engineering, but we keep seeing things like v-bind:id="'list-' + id" or or this. Writing code, not strings, means you can do everything to it that you can do to code. You can type check code. You can lint it. You can optimize it, compile it, validate i…
Re: Hyperscript Tagged Markup: JSX alternative using standard tagged templates
#23The nice thing about React, vs others like Vue and Angular, is that we've learned not to write code in strings. You'd think this would be a fundamental law of software engineering, but we keep seeing things like v-bind:id="'list-' + id" or or this. Writing code, not strings, means you can do everything to it that you can do to code. You can type check code. You can lint it. You can optimize it, compile it, validate i…
Sure, stringly typed programming is sometimes a quick and dirty solution - and that's fine, even permanently, if you just don't want to invest much in whatever you're doing - which too, is fine.
But it's not a good thing. It's cheap and easy, which is sometimes something you need to settle for.
Re: Hyperscript Tagged Markup: JSX alternative using standard tagged templates
#24The nice thing about React, vs others like Vue and Angular, is that we've learned not to write code in strings. You'd think this would be a fundamental law of software engineering, but we keep seeing things like v-bind:id="'list-' + id" or or this. Writing code, not strings, means you can do everything to it that you can do to code. You can type check code. You can lint it. You can optimize it, compile it, validate i…
JSX isn't JavaScript. It's JSX.
Re: Hyperscript Tagged Markup: JSX alternative using standard tagged templates
#25Re: Hyperscript Tagged Markup: JSX alternative using standard tagged templates
#26TIL https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... I'm not a JavaScript developer so this is news to me, very neat feature!
Re: Hyperscript Tagged Markup: JSX alternative using standard tagged templates
#27The nice thing about React, vs others like Vue and Angular, is that we've learned not to write code in strings. You'd think this would be a fundamental law of software engineering, but we keep seeing things like v-bind:id="'list-' + id" or or this. Writing code, not strings, means you can do everything to it that you can do to code. You can type check code. You can lint it. You can optimize it, compile it, validate i…
Both intellij and emacs do all of these things for Vue code. That seems to cover >90% of developers' tooling needs.
Also, code itself is a string. Code is data.
Re: Hyperscript Tagged Markup: JSX alternative using standard tagged templates
#28This is lovely for using React or Preact in Observable! https://beta.observablehq.com/@mbostock/hello-htm We have our own lit-html-inspired html tagged template literals that render directly to DOM, but it’s nice to see HTM’s improved support for function attributes (e.g., onclick), spread attributes, etc.
Eventually we'll get some great parts of this approach standardized, starting with Template Instantiation, and we'll finally have a great way to create and update lots of DOM from data right in the platform.
A future d3 based on that would be very awesome too :)
Re: Hyperscript Tagged Markup: JSX alternative using standard tagged templates
#29Earlier quoted context omitted.
JSX isn't JavaScript. It's JSX.
Why is it not JavaScript? The Ecmascript spec explicitly allows syntax extensions.
Re: Hyperscript Tagged Markup: JSX alternative using standard tagged templates
#30The nice thing about React, vs others like Vue and Angular, is that we've learned not to write code in strings. You'd think this would be a fundamental law of software engineering, but we keep seeing things like v-bind:id="'list-' + id" or or this. Writing code, not strings, means you can do everything to it that you can do to code. You can type check code. You can lint it. You can optimize it, compile it, validate i…
When you write templates, you get more room for optimization. Glimmer engine compiles templates to binary bytecodes to bypass JavaScript parsing. Vue3 inlines component fragments as part of the compilation step.