This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-20
Channels
- # architecture (1)
- # babashka (5)
- # beginners (46)
- # calva (8)
- # cider (12)
- # clj-kondo (2)
- # cljfx (3)
- # clojure (23)
- # clojure-europe (7)
- # clojure-israel (2)
- # clojure-nl (11)
- # clojure-norway (8)
- # clojure-uk (1)
- # clojurescript (27)
- # conjure (2)
- # cursive (50)
- # data-oriented-programming (1)
- # data-science (1)
- # datahike (1)
- # datascript (12)
- # emacs (3)
- # events (1)
- # fulcro (13)
- # lambdaisland (7)
- # leiningen (4)
- # lsp (102)
- # meander (2)
- # off-topic (19)
- # parinfer (3)
- # reveal (8)
- # rewrite-clj (13)
- # shadow-cljs (3)
- # specter (13)
- # tools-deps (6)
- # vim (12)
Hi, I'm trying to use specter in cljs, but I can't get it to work. Even for examples from the tutorial, I get:
(setval {:a [1 2 3]} [:a s/END] [4 5])
Error: No protocol method ImplicitNav.implicit-nav defined for type cljs.core/PersistentArrayMap: {:a [1 2 3]}
Am I doing something wrong?Looks like you did not require the namespace properly
I think you don't want to use refer-macros. Use prefix qualification for setval. CLJS doesn't have access to macros at runtime.
Hm, thanks for the support, I looked into it, but I don't think that's it, that's more or less exactly the line recommended in the spectre README... https://github.com/redplanetlabs/specter#clojurescript
Oh actually, different problem. There is no implicit navigator for maps like that. Not sure where your snippet came from but it's not a valid navigator. See, ex: https://github.com/redplanetlabs/specter/pull/292
The example is also taken verbatim from the readme... Maybe you could explain a bit how implicit navigators work and what they're needed for? I thought my path was pretty explicit :D
I don't see that in the readme