This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-17
Channels
- # 100-days-of-code (5)
- # announcements (13)
- # beginners (98)
- # boot (19)
- # cider (10)
- # cljdoc (32)
- # clojure (142)
- # clojure-dev (37)
- # clojure-italy (3)
- # clojure-nl (2)
- # clojure-spec (30)
- # clojure-uk (18)
- # clojurescript (28)
- # cursive (8)
- # datomic (25)
- # duct (18)
- # editors (5)
- # emacs (39)
- # events (4)
- # figwheel (7)
- # figwheel-main (5)
- # fulcro (38)
- # graphql (19)
- # jobs-discuss (1)
- # jobs-rus (7)
- # keechma (1)
- # lumo (47)
- # off-topic (28)
- # om-next (3)
- # parinfer (3)
- # re-frame (18)
- # reagent (37)
- # reitit (8)
- # shadow-cljs (101)
- # specter (7)
- # tools-deps (8)
- # vim (1)
@b2berry not much detail, but you probably have somehow managed to get multiple copies of react in your JS at same time
That’s the best I’ve been able to find searching the issue. I’ve seen where that’s been patched in other frameworks like ruby-react etc but not sure how I would have multiple copies of react running
If you’re using leininingen and your react is from cljsjs
you can do something like lein deps :tree | grep react
and see if some of your dependencies is transitively pulling in another version of react.
Good tip I’ll check that out. I’ve definitely had to do specific exclusions for some transitive deps as they would force a version downgrade on react which was pretty nasty. I’ll check that next.
what i need to is the following: i have the current route in the db, for which i have a subscription, and i cache data for each route somewhere in the db, for which i also have a subscription (which works like (route-data route)
). now i'd like to pass in current-route as argument to route-data, which needs access to the whole database. how do i do that?
(reg-sub
:db
(fn [db _] db))
Now you can (subscribe [:db])
to get the whole of app-db
(reg-sub
:something
(fn [_ _]
[(subscribe [:db]) (subscribe[:blah])])
(fn [[db blah] _]
....))
However ....
be careful
That subscription will re-run EVERY time app-db
changes in any way