logoalt Hacker News

jagged-chiseltoday at 1:42 AM4 repliesview on HN

What’s the Idiomatic Vanilla JavaScript way to bind data and UI in a web browser?


Replies

tostitoday at 4:17 AM

The whole thing boils down to creating objects (the constructor is built-in) and using functions on objects. Functions are objects, too. In fact, everything except primitive values are objects.

IMHO knowledge of C++, Python, or pretty much everything that's not a lisp variant, doesn't translate well to JavaScript.

There's such a nice language with its own silly warts, readily available to pretty much anyone with a computer regardless of form factor, being misunderstood by the vast majority of programmers.

umvitoday at 2:32 AM

Web components, invoker commands API, etc.

austin-cheneytoday at 3:12 AM

What are you really asking? You use data to populate content or inform your logic.

owebmastertoday at 3:54 AM

With webcomponent each tag is a component instance that can hold data and there are hooks for attributes change