3 ms·
Are there any good ways to keep your data in sync between a model and the DOM with Web Components? Something similar to what Vue or React have?
by aeharding 9y ago
Are there any good ways to keep your data in sync between a model and the DOM with Web Components? Something similar to what Vue or React have?
- ergo14 9y agoSure, there are multiple options, one or two way bindings, virtual dom solutions etc. Pick your poison.
- floatboth 9y agoPolymer. Check out https://github.com/arqex/freezer https://github.com/arqex/freezer if you like immutable data, it works very well with Polymer. All you need to do to integrate them is something like this: https://github.com/myfreeweb/micro-panel/blob/34aeb46600fab5ebfb24f72777e723675dadc34b/src/micro-panel.js#L59-L65 https://github.com/myfreeweb/micro-panel/blob/34aeb46600fab5... (the itemModified stuff is extra, specific to my app) Then just pass the freezer object or its children down the component tree with one-way bindings.
- wanda 9y agoAurelia http://aurelia.io/ http://aurelia.io/