This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-08
Channels
- # architecture (8)
- # beginners (78)
- # boot (20)
- # cider (81)
- # clara (53)
- # cljdoc (10)
- # cljsjs (3)
- # clojure (55)
- # clojure-boston (1)
- # clojure-dev (25)
- # clojure-nl (3)
- # clojure-uk (65)
- # clojurescript (65)
- # core-async (1)
- # cursive (41)
- # data-science (4)
- # datomic (16)
- # editors (74)
- # emacs (17)
- # events (1)
- # figwheel (3)
- # hyperfiddle (39)
- # immutant (16)
- # jobs-discuss (62)
- # juxt (2)
- # keechma (2)
- # leiningen (6)
- # mount (7)
- # nrepl (1)
- # off-topic (30)
- # onyx (14)
- # protorepl (2)
- # re-frame (4)
- # reagent (15)
- # reitit (19)
- # shadow-cljs (102)
- # sim-testing (1)
- # spacemacs (44)
- # specter (15)
- # tools-deps (50)
- # vim (2)
I'm using reagent with apollo and I'm using mainly higher order components to inject query results into my components. Basically, it looks like this:
(-> add-activity-button
reagent/reactify-component
((query/all-activities-hoc))
reagent/adapt-react-class)]])
However, the add-activity-button
needs to get other data as well... what would be the best way to pass other arguments to the add-activity-button
component?
The function looks like this: (defn add-activity-button [{:keys [day all-activities]}] ...
(so, I need to pass day
as well)
@kurt-o-sys I’m not sure how the hoc works, but either the hoc has a mechanism where it passes unknown props or you’ll need to create a factory
ok, I was just hoping I could make something funky with reagent/adapt-react-class
or reagent/create-element
, but neither seem to work fine 😛
I don’t think so. The issue is that (query/all-activities-hoc)
controls the creation of add-activity-button
right. agreed.
oh well, it's actually not that difficult to do it otherwise:
(defn add-activity-button [{:keys all-activities}]
(fn [day] ...))
that's good enough 😛
or so I thought, I still seem to be missing something...
will do it another way. thx.