Fork me on GitHub
#rum
<
2016-12-06
>
pbaille12:12:56

hello, is there a reason for build-class and build-ctor being private?

pbaille12:12:26

I think it should be great to have non macro way to define components

pbaille12:12:40

I'm probably missing something

pbaille13:12:20

I remember build-class being public last year (0.4.2)

martinklepsch14:12:37

Huh, thought there was something like that in the uxbox code but they seem to just use the private build-ctor https://github.com/uxbox/uxbox/blob/94aee02fb922386d6e7d92631241dacfae1f71d5/frontend/src/uxbox/util/mixins.cljs#L20-L29

pbaille14:12:32

ok yes it is something like this

pbaille14:12:50

I’ve just find out that a private var in cljs can be used like a public one

pbaille14:12:00

very suspicious….

niwinz17:12:17

@pbaille yes, we are using the build-ctor in uxbox and would be awesome have it as public api /cc @tonsky

niwinz17:12:27

We define our own macros for define components, much more similar to the standard defn with metadata... in contrast to the rum's builtin macros 😉

pbaille17:12:49

yes totally agree

pbaille17:12:59

what is the point of private vars in cljs since we can access it as public ones?

pbaille17:12:13

yes that’s great, i’ve just look at your « component » function, and it really makes sense for me

pbaille18:12:34

@martinklepsch, i’ve made a bidirectional reaction ref type those days, since it is intended to be use in reactive rum components and somehow related to your derivatives lib, may I ask you if it make sense to you or not?

martinklepsch19:12:39

@pbaille bidirectional = read+write?

pbaille19:12:13

a reactive-derived-ref

pbaille19:12:09

I think the exemple at the bottom of the gist will demonstrate it well

pbaille19:12:26

the thing with derivatives is that they cannot be swapped and propagate to the refs they are derived from, if I understand it

pbaille19:12:59

I often need this kind of behavior in practice

pbaille19:12:29

Maybe it exist elsewhere, or maybe it is a terrible idea 🙂 I don’t know

martinklepsch19:12:19

I see, that's what I mean with read+write

martinklepsch19:12:12

The read+write stuff might be handy in cases but I think many people have found that it leads to problems later down the road

martinklepsch19:12:54

@pbaille cursors are kind of similar I guess but I assume with your thing you can do more complex stuff than just get-in

martinklepsch19:12:22

@pbaille maybe this is interesting to you in this case https://github.com/funcool/lentes

martinklepsch19:12:33

Bit on the run right now so can't read and review your code in more detail but I'll try to remember to get back to it 🙂

pbaille19:12:50

ok thank you for all i will take a look at lentes

pbaille19:12:51

@martinklepsch woaw lentes looks great! thank you

pbaille20:12:05

@niwinz, i’ve just spend some time reading docs and source of potok, beicon and lentes... wow that’s really nice! 🙂 thank you

niwinz21:12:02

@pbaille thanks! I hope you find them useful 😄