This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-04
Channels
- # beginners (56)
- # boot (11)
- # cider (1)
- # clojure (112)
- # clojure-denmark (4)
- # clojure-russia (7)
- # clojurescript (45)
- # component (1)
- # cursive (19)
- # data-science (10)
- # datacrypt (1)
- # datascript (22)
- # datomic (3)
- # defnpodcast (2)
- # emacs (4)
- # fulcro (26)
- # hoplon (21)
- # jobs-discuss (5)
- # klipse (5)
- # onyx (8)
- # portkey (1)
- # re-frame (8)
- # reagent (17)
- # ring (7)
- # shadow-cljs (14)
- # spacemacs (9)
- # vim (4)
I'm getting this warning: "Reactive deref not supported in lazy seq, it should be wrapped in doall" even though I'm always using a (into [:div ... )
when I use e.g, map
. into
also forces evaluation, doesn't it? So why the warning?
map
never forces evaluation, if you use into
the result can't be a lazy-seq so you can't get that error, but map islazy
I'm getting it here: https://github.com/pcolliander/api-test/blob/master/src/cljs/api-test/components/sidebar.cljs#L46 and it goes away if I wrap it in (doall )
- I just don't understand why I have to wrap it in doall
when into
already forces evaluation.
the map isn't pulled into the [], it's just nested inside it
(into [(map f coll)])
- the map isn't forced, it's just a lazy item inside an eager one
perhaps you meant to do (into [] (map f coll))
or equivalent (but better performance) (into [] (map f) coll)
it avoids creating a temporary collection that nobody needs to consume
they are allowed to, the map transducer doesn't, because it doesn't need to
Hi! how do you do testing with Clojurescript? What I'd like to achieve is to spin up a jetty with some clojurescript code in it, and run my webdriver tests against it. For a regular application I've done this, but not sure how to do it for each reagent component separately (the testcases would test the components in this case, not the whole app)
Maybe use devcards to display your components?
@reefersleep no experience with it, but will take a glance, thanks!
Btw, my personal experience with Selenium is that it is slow and unreliable, so I urge everyone to stay away from it. Don't know if that is what you're using.
I'd rather test my components manually. Don't know if other people have had success with programmatically testing reagent components.