Hi! I'm reading through this guide: https://figwheel.org/docs/cursive.html and I'm curious why I have to "Select `Use clojure.main in normal JVM process` ". Is nREPL not compatible with figwheel main?
Anyone using deps.cljs
with figwheel-main
? I've got it working with my project, but there's some odd interactions when a dependency also has it...
Not sure why you are using deps.cljs. Do you mean deps.edn?
@grumplet Nope, its for using npm libs... https://github.com/clojure/clojurescript-site/issues/224
@folcon OK - interesting.
@folcon, so you are following http://widdindustries.com/cljs-npm-libraries/?
Less that and more just trying to do what reagent did, but I'll be trying that later...
Basically I originally wrote an application using figwheel-main, ended up needing npm libraries and now need to turn part of my application UI into a library while still using it...
Syntax error (ClassCastException) compiling at (/tmp/form-init13741706945696949699.clj:1:74).
class clojure.lang.PersistentHashSet cannot be cast to class java.lang.Comparable (clojure.lang.PersistentHashSet is in unnamed module of loader 'app'; <http://java.lang.Com|java.lang.Com>
parable is in module java.base of loader 'bootstrap')
removing the deps.cljs
file in the dep "fixes" it...Hi there! I’m new to figwheel-main and trying to teach myself Clojure and Clojurescript with a simple tic-tac-toe game. I’ve got the base game going in Clojure, and now I’m trying to learn Clojurescript by porting it over. I set up figwheel-main using lein, and have been able to load a test table using the logic of the tic-tac-toe game. I’ve successfully declared each of the TRs of my table to have an integer ID which I pass to my logic. I can see the ID being declared in the console! So, some good first steps!
I’m now trying to get an :onClick
to register a click and perform the function. Strangely, the screen does not seem to update after I pass it the swap! statement… until I actually make my next change of code and save it. Once I do that and flip back, I see the change made! I think this has something to do with “Hot Reloading” but I can’t quite grok what I need to do. (https://figwheel.org/docs/hot_reloading.html)
Can someone please point me in the right direction?
I would say, yes it is but as I understand nREPL is not sufficient to get things rolling: https://figwheel.org/docs/editor-integration.html
@scotto Difficult to say, but from your description the problem lies in the on-click -> state-update -> render flow rather than in figwheel? Then somehow a reload kicks that flow on so it completes properly? So maybe check that the click function updates the state, and also that a state update gets re-rendered. If using reagent, it’s worth a check that the ratom deref really does take place inside a component render function.