Adventures in CLJS now... I require [com.rpl.specter :as sp]
and require-macros [com.rpl.specter.macros :refer [select-one transform setval]]
. When trying to compile, the following is issued: 'Invalid :refer, macro com.rpl.specter.macros/setval does not exist'.
I am using figwheel
Anyone using Specter in CLJS land have any ideas?
OK, it looking further in the doc, I see the CLJS incantation. Let me try that and see if it makes this go away.
Yes, that fixes it. Sorry for the noise.
Require from com.rpl.specter. this namespace .macros is not used anymore
@jsa-aerial I always use sp/select-one
, sp/ALL
and etc
in cljs
@bravilogy That's what I do in CLJ - always namspace qualified for everything. But I thought you needed to explicitly name the macros in a require-macros or :refer-macros them for them to be available in CLJS land. Since macros are expanded and such in the JVM (well unless you are using self hosted) I admit I don't really understand the implementation details of how they are made available in CLJS.
yeah I was just implying the fact that specter works differently in cljs, hence I don’t investigate any further than that 😄 haha. i just namespace them all
Well, other than pulling in the macro stuff (which is anything in cljs land) all the specter code I am using works exactly as in clojure. Very cool!
No 'porting' at all - just use!