Twitter | Pretraživanje | |
Jason Miller 🦊⚛
HTM 3's caching is really exciting. This video shows how only the dynamic parts of a UI are updated, even though the whole demo is a single function and "renders" every update in full.
Reply Retweet Označi sa "sviđa mi se" More
Jason Miller 🦊⚛ 21. sij
Odgovor korisniku/ci @_developit
inb4: you don't have to like, use or even care about Tagged Templates to get this - you can output this via a drop-in replacement for the JSX babel plugin.
Reply Retweet Označi sa "sviđa mi se"
fks 21. sij
Odgovor korisniku/ci @_developit
This is wild! I would have never thought of this as a concern of the templating/rendering layer instead of the actual component framework, but the more I do the more I like it
Reply Retweet Označi sa "sviđa mi se"
Jason Miller 🦊⚛ 21. sij
Odgovor korisniku/ci @FredKSchott
it knows so much
Reply Retweet Označi sa "sviđa mi se"
Axel Rauschmayer 21. sij
Odgovor korisniku/ci @_developit
Isn’t that the responsibility of, e.g., Preact? Or can HTM also be used without a UI library?
Reply Retweet Označi sa "sviđa mi se"
Jason Miller 🦊⚛ 21. sij
Odgovor korisniku/ci @rauschma
It works in tandem. HTM can be used with anything that uses JSX, basically anything that does this: (type, props, ...children) => Thing The key is that HTM skips that function and returns cached results. UI libs can use this to skip rendering referentially-equal nodes.
Reply Retweet Označi sa "sviđa mi se"
Dimitris Grammatiko 21. sij
Odgovor korisniku/ci @_developit
Is there still a v-dom or just template literals magic?
Reply Retweet Označi sa "sviđa mi se"
Jason Miller 🦊⚛ 21. sij
Odgovor korisniku/ci @dgrammatiko
HTM is a replacement for JSX, so it's still whatever renderer you pair it up with.
Reply Retweet Označi sa "sviđa mi se"
Tsavo van den Berg, Knott 22. sij
Odgovor korisniku/ci @_developit
I believe this can be achieved with LitElement + Component-Controller Model through differential rendering. Come to the We bComponents SF talk!
Reply Retweet Označi sa "sviđa mi se"
Justin Fagnani 22. sij
Odgovor korisniku/ci @KnottTsavo @_developit
This is how lit-html works always, regardless of the component model or any abstractions on top of it.
Reply Retweet Označi sa "sviđa mi se"
Joachim Viide 21. sij
Odgovor korisniku/ci @_developit
A good reason to structure your trees so they have as many static parts/subtrees as possible.
Reply Retweet Označi sa "sviđa mi se"