Settings

Theme

Show HN: A ~2kb metaprogramming function that maps data structures to the DOM

github.com

3 points by daliwali 5 years ago · 4 comments

Reader

gigatexal 5 years ago

Is there a bug in the trivial example? I can't seem to follow how it's referencing one template and another in the function. But I am not a JS dev so perhaps I am just missing something.

This looks neat tho.

  • daliwaliOP 5 years ago

    the root template references the other one with data-template=“#countbox”. this allows for composition and re-use of templates.

chovybizzass 5 years ago

looks cool i've been using svelte a lot and find it to be great, although I do not like all the upfront code you have to load for a hello world app.

If this gets more features I can see it being a contender.

  • daliwaliOP 5 years ago

    It is pretty much feature complete already, there are only so many fundamental operations and DOM attributes. besides, I would like to keep it around 2kb ;)

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection