This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-09
Channels
- # beginners (55)
- # boot (173)
- # clara (3)
- # cljs-dev (10)
- # cljsjs (3)
- # clojars (11)
- # clojure (110)
- # clojure-austin (5)
- # clojure-berlin (13)
- # clojure-chicago (2)
- # clojure-dusseldorf (3)
- # clojure-france (24)
- # clojure-italy (4)
- # clojure-portugal (1)
- # clojure-russia (60)
- # clojure-serbia (8)
- # clojure-spec (150)
- # clojure-uk (129)
- # clojurescript (87)
- # core-logic (1)
- # cursive (75)
- # datavis (1)
- # datomic (75)
- # devcards (4)
- # dirac (17)
- # emacs (50)
- # events (2)
- # hoplon (9)
- # jobs (4)
- # jobs-discuss (37)
- # lein-figwheel (3)
- # luminus (5)
- # off-topic (54)
- # om (9)
- # om-next (5)
- # onyx (10)
- # perun (11)
- # protorepl (11)
- # quil (2)
- # rdf (2)
- # re-frame (14)
- # reagent (58)
- # ring (13)
- # ring-swagger (10)
- # rum (52)
- # spacemacs (8)
- # test-check (10)
- # untangled (17)
- # yada (34)
@nrako I haven't had much luck customizing typeahead
I think it may need some work
I'm happier using https://github.com/JedWatson/react-select
here's how to use it from reagent: https://gist.github.com/pesterhazy/4a4198a9cc040bf6fe13a476f25bac2c
@pesterhazy thanks for the note. Will check it out...
hello. I’m trying to write an interceptor. This doesn’t work: (defn check-spec-interceptor [s] (re-frame/after (s/assert :db/good-state s)))
. I get an error: re-frame: when registering :initialize-db, got a function instead of an interceptor. Did you provide old style middleware by mistake?
There is a re-frame/->interceptor
, but I don’t understand how to use it.
never mind, made this work: (def check-spec-interceptor (re-frame/after #(s/assert :theproject.db/good-state %)))
How to make sure only given keys are in spec? I have (s/def ::good-state (s/keys :req-un [::name ::active-panel]))
and it doesn’t complain when the state also has :whatever true
.
@negaduck https://groups.google.com/forum/#!topic/clojure/fti0eJdPQJ8 Specifically, Alex Miller’s response using s/merge for s/keys and s/map-of
(s/def ::my-map2 (s/merge (s/keys :req [::a ::b]) (s/map-of #{::a ::b} any?)))
(s/explain ::my-map2 {::a 1 ::b 2 ::BAD 3})
In: [:user/b] val: 2 fails spec: :user/b at: [:user/b] predicate: string?
In: [:user/BAD 0] val: :user/BAD fails spec: :user/my-map2 at: [0] predicate: #{:user/a :user/b}