helix

https://github.com/Lokeh/helix
dominicm 2020-06-16T14:52:56.249700Z

I feel like I asked this before, when I want to pass js object props to a component when using $, how do I do that? Is {:& (theProps)} my only option? It feels inefficient.

lilactown 2020-06-16T14:57:03.250Z

yeah, {:& whatever-props}

dominicm 2020-06-16T15:02:41.250100Z

Oh, you actually optimize this case. By checking for (seq m) and just returning it if so, nice.

dominicm 2020-06-16T15:04:03.250200Z

ah, but native props is runtime :thinking_face:

dominicm 2020-06-16T15:04:25.250300Z

Oh, everything goes through it, so all good

dominicm 2020-06-16T15:05:04.250400Z

I wish I had a recursive #js sometimes, I wrote one once.

lilactown 2020-06-16T15:06:15.250600Z

Yeah same

lilactown 2020-06-16T15:07:28.251800Z

Really I wish that maps compiled to #js if they’re never assoced 😝

dominicm 2020-06-16T15:17:13.252100Z

I can't even imagine the analysis on that...

dominicm 2020-06-16T15:17:43.252200Z

My colleague has expressed similar wishes though, except that everything was #js by default… I didn't like that as much because mutability.

dominicm 2020-06-16T15:19:28.252300Z

I did just discover that the appliedscience js-interop library has j/lit for this use-case, but I'm trying to reduce my dependence on that. I think cljs-bean & goog.object are better/good enough, respectively.

lilactown 2020-06-16T15:36:35.253Z

or even if JS objects implemented assoc / get / etc. and just did copy-on-write

lilactown 2020-06-16T15:37:30.253900Z

i’m not sure how safe that would be tho since there’s a lot of objects out there that you might not want those semantics 😛

lilactown 2020-06-16T15:37:48.254300Z

the conflation of data literal === object is annoying in this case

Eliraz 2020-06-16T15:52:15.255100Z

does anyone here has an experience with reitit ? is it worth the try?

dominicm 2020-06-16T15:53:49.255400Z

@lilactown also, the new proxies feature would be a real thorn in that. Imagine doing a get on an object and it starts doing stuff.

lilactown 2020-06-16T15:59:22.256Z

well that’s already possible in CLJS 😛 since get is just a protocol, anyone can do anything in it!

dominicm 2020-06-16T16:10:16.256100Z

There is examples of doing that, though dnolen has discouraged for reasons I forget

lilactown 2020-06-16T16:23:07.257200Z

would be fun to play with a mobx-like reactive interface where get is what attaches listeners and assoc triggers downstream changes

dominicm 2020-06-16T16:59:47.257300Z

stahp

lilactown 2020-06-16T17:01:31.257500Z

lol