|
|
|
|
|
by harperlee
2015 days ago
|
|
Exactly! This method of limiting the mutable part to one point is a pattern that is highly useful, and highly used, when working in clojurescript with react through reagent and re-frame, for example: you represent the whole state of your app in a tree of maps and define functions that, given a version of your app state, return the updated version. Then you just execute state-changing pure functions linked to a stream of events to move your one-point-mutable-app-state through a stream of valid states. (and also obviously functions that map that state to HTML/CSS/SVG/etc.). |
|