6 ms·
Why does no client-side framework beside Knockout use data-* attributes? Whyy??
by marcoms 12y ago
Why does no client-side framework beside Knockout use data-* attributes? Whyy??
- skrebbel 12y agoReact does.
- chenglou 12y agoNo, React does internally, for the purpose of its diffing algorithm (which is subject to changes). React's public facing API does not use data-* whatsoever. As a matter of fact, storing user data in data-* attributes is unnecessary in React. Just like graphics programming, you're better off storing vertices data in the data structures themselves, not in the final onscreen output of the vertices.
- skrebbel 12y agoIndeed. I don't believe the GP implied that the data-* had to be user data to count. In fact, the way data-bind is used in Knockout isn't really user data either. You'd store that on the view model, not in a data-* attribute.
- imakesnowflakes 12y agoI didn't use it because I thought it would make it more verbose and I couldn't see any distinct advantage in doing so.
- Kiro 12y agoWhy do you want data-* attributes? If only for validation, why?
- ergo14 12y agoangular does
- mattsouth 12y agobatmanjs does. Admittedly its a fairly niche framework but we use it a lot.
- aikah 12y agoyou can use data-* attributes in angular,ng-repeat and data-ng-repeat are the same.Trust me they've got your coverred on this.