Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can someone explain what is "keyed" Vanilla-JS?


Is your question what is keyed (answered in the blog) or what‘s vanillajs (javascript without a framework)?


What is "keyed Vanilla-js". As I understand the definition of keyed, it's a feature that js doesn't have.

EDIT: from the blog:

"All modern frameworks have some kind of binding between data and DOM nodes. This binding is especially interesting when data consists not of a single item, but of a list of items. If data changes the question is which DOM nodes should be updated, inserted or removed."

It's unclear because it seems to talk about data binding (which is not part of js), but actually is talking about an identity association between a DOM node and a data object. I guess it just means there is a one-one association between nodes and data points, and when a data point [identity] changes, the corresponding DOM node is entirely destroyed and recreated.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: