4 ms·
Where's the part of React which allows me to return a new copy of what I want the HTML to look like, while only updating the changed elements of my view instead
by mambodog 10y ago
Where's the part of React which allows me to return a new copy of what I want the HTML to look like, while only updating the changed elements of my view instead of totally blowing away the existing elements (the virtual DOM + reconcilitation part of React)? Also, where's the declarative event binding part?
I'd also point out that the state tree (setState) is a part of React, and plenty of apps are just fine being built using only setState for state management (no redux/flux/mobx).
- Touche 10y agoYou're right, custom elements don't do that, and it's not a goal of the custom elements spec (as far as I can tell) to promote any particular programming style. It's a low level spec. So showing the most low-level way to use it makes sense. Here's a library that combines custom elements with VDOM rendering: https://github.com/skatejs/skatejs https://github.com/skatejs/skatejs