Settings

Theme

Show HN: ElemX – Native Web Components Using MobX with Vue-Like Template Syntax

github.com

2 points by agquick 6 years ago · 2 comments

Reader

spankalee 6 years ago

Looks very nice!

FYI, we've been able to get MobX to work very nicely while still keeping binding expressions as actual JavaScript with ${} expressions.

The benefits there are that you get syntax-highlighting and some type-checking of the expressions for free without extra tooling that understands your template syntax. You could still keep the Vue-like syntax for the rest of the templates. Might be something to look into.

  • agquickOP 6 years ago

    Thanks for taking a look! That’s actually a great idea. It’s always a trade off with bindings in html templates, you lose the things you just mentioned. Right now the bindings are passed to the mobx reactions tied to the element, I’d be curious how that could still be maintained with the proper scoping.

Keyboard Shortcuts

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