This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-15
Channels
- # aws (4)
- # beginners (98)
- # boot (23)
- # cider (63)
- # cljsrn (3)
- # clojure (259)
- # clojure-boston (1)
- # clojure-dev (2)
- # clojure-italy (6)
- # clojure-nl (17)
- # clojure-russia (1)
- # clojure-serbia (1)
- # clojure-spec (36)
- # clojure-uk (74)
- # clojurescript (11)
- # cursive (2)
- # datascript (12)
- # datomic (36)
- # defnpodcast (1)
- # devops (1)
- # docs (1)
- # emacs (15)
- # euroclojure (3)
- # fulcro (13)
- # graphql (1)
- # juxt (2)
- # lumo (27)
- # off-topic (46)
- # onyx (23)
- # pedestal (6)
- # planck (2)
- # portkey (27)
- # re-frame (18)
- # reagent (12)
- # remote-jobs (2)
- # ring-swagger (11)
- # rum (4)
- # shadow-cljs (104)
- # spacemacs (4)
- # sql (3)
- # tools-deps (5)
- # vim (45)
@bravilogy sorry had to step away. I don’t immediately see any problem there.
If the console is logging what you expect though make sure full-path is the same. Looks like you’ve almost narrowed it down
I have an event that derives data from the app db. Would it be a good idea to for that event to pull the data through a sub? If so what would be the right way to do this? (subscribe [:event])
in the event doesn’t seem very pure. Perhaps an interceptor?
@caleb.macdonaldblack https://github.com/Day8/re-frame/blob/master/docs/FAQs/UseASubscriptionInAnEventHandler.md
Hey thanks!
Interesting
Hi, we are making a refactoring and appreciate some input on it. Previously we had an events.cljs
file with all the events for the whole app. Now the app starts to grow and we need to split it up. We thought about moving the events to the same file of the component that calls the event. Is there any reason we shouldnt do this? It seems easier to work with the code that way.
@karl.jakob.lind Some tips on app structure here: https://github.com/Day8/re-frame/blob/master/docs/Basic-App-Structure.md
@karl.jakob.lind you might find the way i’m organising the code in https://github.com/robert-stuttaford/bridge interesting - see the readme for developer diaries 🙂
I tend to put event handlers in the same directory as the component/page that dispatches the events, but not in the same file
But I've seen people put them in the same file and it seems to work out fine as long as there are relatively few/short events
perfect, then it sounds like it wasn't a bad idea 😄 thanks for the feedback and links guys!
I put them on the same file, no problems so far
always found the whole "events.cljs" and "subs.cljs" idea kind of weird
I like keeping them separate. More logical and maintainable. Less temptation to cut corners.
I do like descriptive namespaces so this is our convention https://confluence.condense.com.au/pages/viewpage.action?pageId=28082771