This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-13
Channels
- # beginners (14)
- # boot (108)
- # carry (6)
- # cider (28)
- # cljs-dev (107)
- # cljsrn (32)
- # clojars (4)
- # clojure (62)
- # clojure-austin (15)
- # clojure-berlin (1)
- # clojure-brasil (3)
- # clojure-chicago (1)
- # clojure-dev (9)
- # clojure-greece (2)
- # clojure-italy (4)
- # clojure-nl (1)
- # clojure-poland (2)
- # clojure-portugal (1)
- # clojure-russia (24)
- # clojure-spec (63)
- # clojure-uk (30)
- # clojurescript (123)
- # cursive (13)
- # data-science (1)
- # datascript (1)
- # datomic (27)
- # devcards (11)
- # dirac (1)
- # emacs (5)
- # events (4)
- # hoplon (27)
- # jobs (3)
- # juxt (3)
- # leiningen (11)
- # off-topic (18)
- # om (46)
- # om-next (7)
- # onyx (50)
- # pedestal (6)
- # portland-or (8)
- # proton (16)
- # re-frame (38)
- # reagent (21)
- # ring-swagger (14)
- # specter (46)
- # untangled (116)
- # vim (46)
- # yada (22)
hey guys, I’m using reagent but would like to know if there’s an idiomatic way to trigger actions in a series of nested components
for example, if compA contains compB contains compC, upon url change, I’d like to have compC first run a function, then compB, then compA
and also the other way around, i.e. when URL changes, compA run a func, then compB, then compC
i know that with nested component, one can create a function, as pass it as “props” to the nested component, then upon some action, the nested component can run a func, inside of which it calls the parent’s func
however, this method only works when the action is a button click or something that’s inside the nested action, what if I have a global side-effecting action (like URL change, or some websocket channel receives new data)
i guess potentially the global side effecting thing could potentially push the data into a channel, and the inner nested component just “takes” from that channel and trigger the action?
@mikethompson this has encouraged me to redesign my CES to reduce some complexity in the data structure in return for making the API code a little more complex, this is good
Has anyone here used the following recipe with 0.6.0? https://github.com/reagent-project/reagent-cookbook/tree/master/recipes/ReactCSSTransitionGroup
@gadfly361 thanks!
@gniquil: It sounds like you desire reactions?
In any case, it sounds like you want to depend on some global side-effecting change. When this occurs, put some new data into a globally available r/atom which your components read from, then perform your calculations inside your components based on that read. I guess? I can't figure out from your description whether your problem is trivial or hard 🙂 Maybe you could approximate the problem in a code example?
If I am using the 2 fn version of reg-sub is it okay to refer to re-frame.db/app-db as one of the signals I return?
@sandbags Sure, that's okay.
note: there is a specific #re-frame channel which is very active. These questiosn might be best asked in there