figwheel-main

figwheel-main http://figwheel.org
2020-08-25T14:09:20.045200Z

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?

2020-08-25T15:48:14.046300Z

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...

grumplet 2020-09-03T21:32:49.006800Z

Not sure why you are using deps.cljs. Do you mean deps.edn?

2020-09-04T12:30:13.007300Z

@grumplet Nope, its for using npm libs... https://github.com/clojure/clojurescript-site/issues/224

grumplet 2020-09-04T15:16:50.007800Z

@folcon OK - interesting.

grumplet 2020-09-04T15:24:39.008Z

@folcon, so you are following http://widdindustries.com/cljs-npm-libraries/?

2020-09-04T19:15:55.012100Z

Less that and more just trying to do what reagent did, but I'll be trying that later...

2020-09-04T19:16:46.012300Z

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...

2020-08-25T15:53:21.046400Z

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...

Scott Starkey 2020-08-25T18:37:57.057700Z

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?

emak 2020-08-25T20:46:17.057900Z

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

grumplet 2020-08-25T21:14:02.063500Z

@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.