When figwheel reloads re-frame code, there are some warnings that I would
like to turn off, as they are expected.

In the part of the code which logs a warning, I have defined
**warn-on-overwrite** as a dynamic var and check if it is true before
emitting a warning. In my figwheel config, I have :before-jsload and
:on-jsload keys. The :before-jsload function set!’s *warn-on-overwrite* to
false, and the :on-jsload function set!’s *warn-on-overwrite to true.

Should I be:

   - Putting earmuffs around the var
   - Marking it as ^:dynamic or not
   - Using an atom instead?

A var feels better than an atom here, but I don’t have a strong
justification for that.

Can someone give some guidance on when to use ^:dynamic in ClojureScript
code? I can see it should be used in conjunction with binding, but I’m not
sure about with set!. This is going to be called by users of the re-frame
framework if that makes a difference?


Note that posts from new members are moderated - please be patient with your 
first post.
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to