3 ms·
to be clear, Immutable.js "setters" are only there because we don't have native syntax for updates. The article is talking about using setter methods to abstrac
by dustingetz 11y ago
to be clear, Immutable.js "setters" are only there because we don't have native syntax for updates. The article is talking about using setter methods to abstract over data changes so we have a place to run code when things change. That's not what immutable.js setters are for.
- braythwayt 11y ago+1! There are many, many, MANY things you can do when you make setting and retrieving a property "programmable." Injecting "method advice" to propagate changes--as the post describes--is one. Making data immutable through copy-on-write is another. Same mechanism, entirely different architectural objectives.