The magic of creating immutable data structures that can be manipulated with conventional JavaScript mutation operators is to use proxies under the hood.
These convert mutations into selectively copied data. Think: structurally shared data structures like in ImmutableJS or Clojure.
If you’re a full stack developer who is reluctantly mulling over jumping into front end development, you should perhaps stop and consider this approach instead.
Unlike other front end frameworks like Angular and React etc, Stimulus isn’t about constructing the DOM from a blank page, it’s about augmenting the HTML that has already been delivered from the server. It also uses Ajax to smooth the transitions between pages of HTML without losing the ability for the server to serve full HTML page rather than just delivering JSON.
This is about going back to the web the way it was when it was all server side but Stimulus is also about smoothing out those gnarly edges that made it so shit at times. This augmentation approach is the one taken by BaseCamp. GitHub also uses a fairly similar technique to produce an elegant high scale UX.
Stimulus is lightweight and coexists nicely with things like Bootstrap and Material Design Lite without needing to rewrite their JQuery or JavaScript support libraries.
This framework is by the creators of Ruby on Rails.
The scan() operator in RxJS is just like reduce() operator in most fuctional libraries except for one thing, it emits partial reductions continuously as a stream which you can subscribe to. This is applied to a stream of actions (actions$) and the reducer is a pure function which is applied to each action in turn with the signature.
(state, action) => newstate
The state is the “accumulator” of the reduction and scan() emits a stream of states as its output. The render object is an Observer which is like a listener with callbacks for next(value), error(err) and complete().
What would a programmer want to learn mathematics for?
Steve Yegge from before Google decided to hogtie him and put him in a gimp suit. He’s recently resurfaced and is blogging again but here’s one from the olden days.