Morning 🙂 Is there a way to ask Clerk to recompute the notebook on atom changes, but without syncing the atom state to the frontend? I'm asking because the data I'm trying to put in my atom contains reader tags that aren't installed in the Clerk Clojurescript environment.
When I reset! an instant into the synced atom, I get this exception:
When I remove ::clerk/sync true, all is peachy.
Calling nextjournal.clerk/recompute on each atom change appears to work reasonably as a workaround. Changes reflected in values that deref the atom update immediately, though I don't see any changes in the original defonced atom.
(do (defonce !state (atom nil))
@!state)
^{::clerk/visibility {:code :hide :result :hide}}
(add-watch !state ::recompute (fn [_ _ _ _] (clerk/recompute!)))
(comment
(reset! !state (random-uuid))
)I’m thinking of Clerk’s eval-cljs and ClojureScript’s cljs.reader/add-data-readers off the top of my head, though I’m sure there has to be a more elegant way.