This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-25
Channels
- # aleph (6)
- # beginners (6)
- # boot (94)
- # cider (34)
- # cljs-dev (36)
- # cljsrn (12)
- # clojure (124)
- # clojure-dev (41)
- # clojure-dusseldorf (6)
- # clojure-italy (3)
- # clojure-norway (1)
- # clojure-russia (161)
- # clojure-sg (7)
- # clojure-spec (71)
- # clojure-uk (95)
- # clojurescript (38)
- # core-async (16)
- # cursive (14)
- # data-science (1)
- # datascript (12)
- # datomic (15)
- # emacs (22)
- # funcool (2)
- # hoplon (15)
- # jobs-rus (2)
- # juxt (9)
- # liberator (7)
- # lumo (1)
- # off-topic (136)
- # onyx (24)
- # pedestal (39)
- # perun (2)
- # planck (20)
- # re-frame (23)
- # spacemacs (31)
- # unrepl (5)
- # untangled (1)
- # vim (1)
- # yada (29)
I found an interesting bug and was wondering if others have ran into it. It turns out if you register a sub to a keyword where the keyword is acting as the handler like so (reg-sub ::my-sub :data-key)
you get some very odd behavior when the key is not present in the db. One would expect the subscription to return nil when the keyword is not present but instead it returns the subscription vector. So if db
is {}
and we call @(subscribe [::my-sub])
we get [::my-sub]
as the return value instead of nil
.
so I am having some weirdness where my app is still saying "Hello from re-frame" when I have already removed that view logic from the app.
is there some command aside from lein clean
I need to use to reset all of the cached stuff?
@ckirkendall That’s because the subscription handler is passed the db AND the subscription vector. So your subscription is essentially handled like (:data-key {} [:my-sub])
I’m pretty sure a key as a function is just the same as calling (get {} :data-key [:my-sub])
so you are actually passing in the subscription vector as the “default value if none exists” parameter
ah that makes total sense now
@kasuko thanks!
@mikepence did you check in Settings / Preferences / Network / Disable cache (while DevTools is open) ?
err..super noob-style questions, but how do I get into my viewer.views ns in figwheel?
thanks @U2J4FRT2T
Hi, re-framers. What recommendations for a lot of forms - any opinionated form builders?
@nicola, you could try re-com. IMHO form-handling is incredibly painful in react generally though, and I've contemplated switching to (gasp) jQuery or something for our form-heavy apps.
I'll be interested to hear back if you find something that's easy to use
Another route is to explore the google Closure stuff, since you get all of that "for free" with the compiler. It tends to be heavily imperative, though, so it's not necessarily the best fit for ClojureScript. But there are a ton of controls and they generally have been well-tested and implemented