Re:Show HN: Sentinel.JS - The simplest alternative to angula...
by marcoms on Monday July 07, 2014 @04:26AM
(#7997683)
Why does no client-side framework beside Knockout use data-* attributes? Whyy??
[ Parent
| on HN ]
Re:Show HN: Sentinel.JS - The simplest alternative to angula...
by imakesnowflakes on Monday July 07, 2014 @05:12AM
(#7997832)
I didn't use it because I thought it would make it more verbose and I couldn't see any distinct advantage in doing so.
Re:Show HN: Sentinel.JS - The simplest alternative to angula...
by Kiro on Monday July 07, 2014 @05:43AM
(#7997923)
Why do you want data-* attributes? If only for validation, why?
Re:Show HN: Sentinel.JS - The simplest alternative to angula...
by aikah on Monday July 07, 2014 @07:02AM
(#7998164)
you can use data-* attributes in angular,ng-repeat and data-ng-repeat are the same.Trust me they've got your coverred on this.
Re:Show HN: Sentinel.JS - The simplest alternative to angula...
by skrebbel on Monday July 07, 2014 @04:31AM
(#7997703)
React does.
Re:Show HN: Sentinel.JS - The simplest alternative to angula...
by chenglou on Monday July 07, 2014 @04:46AM
(#7997763)
No, 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.
Re:Show HN: Sentinel.JS - The simplest alternative to angula...
by skrebbel on Monday July 07, 2014 @05:07AM
(#7997820)
Indeed. 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.