2 ms·
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
by chenglou 12y ago
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.
- 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.