3 ms·
It's really easy to make the states diverge this way. That's why the one-way binding is popular. OTOH if there were a way to produce a two-way implementation f
by nine_k 4y ago
It's really easy to make the states diverge this way. That's why the one-way binding is popular.
OTOH if there were a way to produce a two-way implementation from a one-way description, that could be great for performance. But this is already more CS than engineering.
- redbar0n 4y agoHow do the states diverge? I think you can have a two-way binding with a controlled update procedure, akin to one-way data-binding. I’ve read some people claim to do it by producing a kind of one-way directionality under-the-hood (?) from two-way bindings. The goal being that views can update state (and other views). I think it was here I read it: «‘2-way’ shouldn't be a problem if a component reports user events (perhaps transformed/mapped) to the domain model without changing it's own core state (disregarding throttling etc.) and only changes its core state in response to events from the domain model.« — peerreynders @ https://dev.to/peerreynders/comment/1objn https://dev.to/peerreynders/comment/1objn