helix

https://github.com/Lokeh/helix
2020-05-24T13:41:28.497100Z

Why defnc bean property is not interoperable with helix.dom ? https://gist.github.com/geraldodev/ca7954d3ee9c0e7f98862d7c49ca694c . I was trying to make an Input with some logic so I had to receive props and pass to d/input

dominicm 2020-05-24T14:14:32.498800Z

@geraldodev I think if you use a symbol, it's assumed to be a JavaScript object, for performance reasons. You'll need to convert it to a js structure yourself using clj->js. I think bean will support that.

2020-05-24T14:20:56.000100Z

@dominicm helix converts it to a Bean. I tried beans ->js with no success. Also tried clj->js after your suggestion. Same result.

Eliraz 2020-05-24T15:39:18.002500Z

Hey everyone, I got an idea in my mind, though I'm not sure I fully understand `core.async` , I was thinking that I could use `channels` as reducers to an `atom` or just a `map` which then could handle multiple requests to change the state more gracefully, does this make any sense? (for some odd reason this channel seems more active than the #clojurescript channel)

lilactown 2020-05-24T15:56:10.004Z

@geraldodev your code is slightly incorrect, @dominicm is right that you can’t hand a symbol as props without some additional syntax: https://github.com/Lokeh/helix/blob/master/docs/creating-elements.md#dynamic-props

lilactown 2020-05-24T15:56:59.004600Z

your example would be (d/input {:& props})

dominicm 2020-05-24T16:23:58.006400Z

Ah, if there's ambiguity it's assumed to be a react element.

dominicm 2020-05-24T16:26:16.007500Z

It would be handy if I could override that if I say "I know what I'm doing", e.g. I have a custom ->js that I know is fast.

lilactown 2020-05-24T16:28:57.008200Z

sure, you can do that using either :& or &

dominicm 2020-05-24T16:29:59.010200Z

Isn't :& dynamic & for cljs though?

lilactown 2020-05-24T16:30:25.010400Z

you can give the & prop a map or a JS object as of the latest version

dominicm 2020-05-24T16:31:21.010900Z

Oh, cool :).

lilactown 2020-05-24T16:32:40.011600Z

it does a check to see if it’s a map and if not, merges it with static props using goog.object/extend

2020-05-24T16:35:58.011900Z

@lilactown Thank you!

2020-05-24T20:42:43.015600Z

@lilactown every call that does not use literal props needs to to use :&. Is that for performance reason ? because $ needs to compile its arguments to get as much as performance as possible ?

lilactown 2020-05-24T23:42:51.016200Z

Yep