Fork me on GitHub
#re-frame
<
2017-05-29
>
leontalbot02:05:23

@jhund Really nice, thanks!

mdallastella08:05:09

'Morning. A quick question. We are developing a project which has 1 backend (ring and compojure-api) and 3 different interfaces (re-frame). Now we would like to split this huge project (and the git repositories) in 4 different subprojects. Any advice or thought about how we should proceed?

piotr-yuxuan13:05:48

mdallastella: Perhaps you might be willing to use Posh for background data sync

danielcompton10:05:34

@mdallastella can you give a bit more context on how you release changes/develop code, e.t.c.? The monorepo vs. separate projects decision seems to me to be mostly about what fits the org structure best

danielcompton10:05:57

Do you have one Leiningen defproject for all three re-frame apps + the backend?

mdallastella10:05:26

@danielcompton Exactly... I was wondering if it's possible to have different lein projects (one for each interface and one for the backend)

danielcompton10:05:43

Yep, that is possible. You can use lein checkouts, or :source-paths "../other-project" to depend on code from other projects (within the same repo)

mdallastella10:05:58

Thanks @danielcompton, I'll look further into lein checkouts... My idea is to checkout the backend project on every interface project. Does it make sense?

danielcompton10:05:57

Yeah it does. If they're all in one repo then source-paths might be a better fit. Whichever you choose, don't forget to lein install your depended projects when you change your dependencies, checkouts only handle source level changes, not project.clj changes

denik14:05:58

Is there a way for a component to declare subscriptions for its children? For example if a child subscribes to ::subs/todos (which depends on the user who’s todos we want to show) and a parent declares ::subs/local-user as Bob based on it’s props, then all children that subscribe to ::subs/local-user and descend from the Bob parent component will get it as a user and it doesn’t have to be passed through every component in the chain.

danielcompton19:05:16

@denik you can pass values to child components to do that, sounds fine to me

denik19:05:56

@danielcompton of course, until you have a hundred components, that really don’t need that prop, other than to pass it to subscriptions. it makes things look very noisy

danielcompton22:05:43

I don't really understand what you're asking sorry?