I think I'm on to something now: declarative custom element creation w/ template literals.https://github.com/mikeal/gza
-
-
if you have an element that needs to hold state, you shouldn't be creating it in the dynamic templating.
-
What would you propose as an alternative? Currently "component" almost always refers to "stateful DOM thing" – it'd be neat if it was poss.
- 2 more replies
New conversation -
-
-
forcing "just strings" makes it pretty clear that this all gets blown away on re-render. which is limiting, but probably a good thing.
-
I think for rendering in Node the Promise thing you got going is pretty good – if we can wait for that, and then serialize to string it good
End of conversation
New conversation -
-
-
I actually kinda started with something like that, back with funky. I stayed away this time though, for a few reasons.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
There's a lot of weirdness with templatizing that way, because you end up blowing away those elements every time you re-render.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
but, because other custom elements end up in the render, you instinctively treat them like they will stick around and hold state.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
there's a pretty chaotic environment *causing* state changes, I wanted to serialize that as much as possible into a single pipeline.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.