Open martinklepsch opened 1 year ago
a state would only needed to be dereffed "in-cljc-mode" here are some docs with an example on starting / stopping / using the state in this mode.
I can see how the "front page" doc may be misleading if ClojureScript is the only env, which is unusual, but probable :) instead of altering it, we can add a note on a bottom:
(defstate conn :start (create-conn)
:stop (disconnect conn))
or "
:stop (disconnect @conn)
" in case of ClojureScript. more cljs docs herefeel free to add it, or I can do it
This could be either a question or a documentation fix. In my nodejs/cljs usage of mount I found that I need to deref the var that I define with
defstate
in the:stop
function. Is this correct and the documentation should be updated?Could also a difference between Clojure and ClojureScript maybe?