This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-20
Channels
- # beginners (27)
- # calva (32)
- # cider (9)
- # clojure (111)
- # clojure-spec (71)
- # clojure-uk (7)
- # clojurescript (22)
- # cursive (20)
- # devcards (1)
- # emacs (4)
- # fulcro (3)
- # hyperfiddle (3)
- # off-topic (8)
- # pathom (26)
- # planck (19)
- # quil (4)
- # re-frame (1)
- # reitit (43)
- # rewrite-clj (9)
- # shadow-cljs (13)
- # spacemacs (7)
- # uncomplicate (5)
`(ns threedays.components.pcard
(:require [reagent.core :as r]))
(def locals (r/atom {}))
(defn localnews [] (swap! locals update :metehan "XXX"))
Uncaught TypeError: f.call is not a function
at core.cljs:5331
at Function.cljs$core$IFn$_invoke$arity$3 (core.cljs:5331)
ah thanks it worked. the tutorial I follow instructor guy used update and it worked. that's why i was surprised. is it because some version difference or I did something wrong?
so update you have to pass it a function that it’ll run on the value of a specific key (such as (update {:a 1} :a inc)
). I don’t think thats changed at all.
i see the difference now. yes he used "inc" I just misunderstood how swap! works. thank you for making this clear for me 🙂
When linting omcljs/om using a classpath produces by lein classpath
I got some weirdness. Turned out I was linting multiple versions of the same namespace.
That was caused because devcards brings in another older version of om:
[devcards "0.2.4" :scope "test" :exclusions [[org.clojure/clojurescript]]]
[cljsjs/showdown "1.4.2-0" :scope "test"]
[sablono "0.8.1" :scope "test"]
[org.omcljs/om "1.0.0-alpha48" :scope "test"]
Maybe that should be excluded from the classpath in the project.clj?