This Web Developer Destroyed Frameworks with this 1 Weird Trick
-
-
Prikaži ovu nitHvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
-
Hey, this is what I do too! Though, your function looks nicer... Curious as to why you used var instead of const? I'm always looking to make sure I'm doing that correctly.
-
Const is a funny construct in JS because of object mutations. I typically reserve it for top-of-file constant declarations. Similar thing- I only use let if I'm declaring variables within a scope. Otherwise I use var.

- Još 1 odgovor
Novi razgovor -
-
-
I can still feel the
@htmlenergy -
every time I use that template fn I want to tweet "iS hTmL a LiSp??"
- Još 1 odgovor
Novi razgovor -
-
-
Out of curiosity – is the className special case needed? Doesn’t `el.setAttribute("class", "whatevs")` do the trick as well?
-
Uhh hmm! I was under the impression that `class` was reserved (if unquoted) and also didn't work with setAttribute, but... It looks like you might be right!
Kraj razgovora
Novi razgovor -
-
-
If you do `(tag) => (props, ...children)`, then you can do `const [ h1, a, div ] = "h1 a div".split(" ").map(el)` which is fun. I've been experimenting a lot with minimal JS, examples: https://codepen.io/Xananax/pen/wvBQKed … https://codepen.io/Xananax/pen/LYEXpWw …https://codesandbox.io/s/sf-0jh6g
-
Incidentally, one main motivation for this is to be able to create pages for Beaker that are usable, with a framework that doesn't obscure how things work, so other people can fork and modify without doing arcane things.
- Još 2 druga odgovora
Novi razgovor -
-
-
If you're using TypeScript, you can make TSX use that function too.
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.