Fork me on GitHub
#re-frame
<
2018-05-15
>
mikerod00:05:18

@bravilogy sorry had to step away. I don’t immediately see any problem there.

mikerod00:05:01

If the console is logging what you expect though make sure full-path is the same. Looks like you’ve almost narrowed it down

caleb.macdonaldblack02:05:04

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?

jakob06:05:42

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.

robert-stuttaford07:05:10

@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 🙂

curlyfry07:05:55

I tend to put event handlers in the same directory as the component/page that dispatches the events, but not in the same file

curlyfry07:05:29

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

jakob07:05:16

perfect, then it sounds like it wasn't a bad idea 😄 thanks for the feedback and links guys!

joelsanchez07:05:08

I put them on the same file, no problems so far

joelsanchez07:05:36

always found the whole "events.cljs" and "subs.cljs" idea kind of weird

manuel08:05:52

I separate them: events, subs and views for every "panel"

Oliver George09:05:32

I like keeping them separate. More logical and maintainable. Less temptation to cut corners.