Events and Effects in Re-Frame
Now that we have our WebSockets layer all set up, let’s get the rest of our re-frame stuff in order. Earlier, we accomplished the goal of making our application’s view a computation of our app-db. Now, we want to go a step further and make sure that we properly separate events from effects.
Until now, we’ve been writing event handlers by using re-frame’s built-in effects (for example, :db, :dispatch, and so on) and calling effectful functions where built-in effects fall short. We’ve gotten pretty far with this approach, but we need to improve this sooner or later. As we discussed earlier, re-frame’s distinction between events and effects is crucial.
The Value of Isolating Effects
Our ultimate goal in using re-frame ...
Get Web Development with Clojure, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.