Fork me on GitHub
#helix
<
2020-06-07
>
Eliraz09:06:48

@fabrao can you elaborate? I'm currently seeking which one is better for me, helix or reagent, the ability to use hooks is important to me, now reagent has that feature and it got me confused again

Eliraz12:06:49

how would you go about render props in helix?

Aron14:06:09

you can pass functions as props in helix as well, what is the issue?

Eliraz14:06:34

oh I didnt say there's an issue. but how can you pass a function as children? I mean, what's the syntax?

Eliraz14:06:18

I'm still getting used to the language.

alidlorenzo15:06:11

Helix is a minimal React wrapper, so it doesn’t try to impose new conventions, just helps you write React in idiomatic Clojurescript.

alidlorenzo15:06:18

For render props, just pass a function as a child to your component, as you’d regularly do. I imagine something like this would work ($ Comp (fn [x] x)) , just make sure Comp handles the render prop

Eliraz15:06:01

got it. thanks

fabrao18:06:45

@eliraz.kedmi Well, in reagent I didn´t know where to put things to be "Reactive". In Helix you use (use-state) and that´s it. You have to control the updating part with hooks. And besides if you have questions about how it works, you can seek even in React documentation, that have lots of references

fabrao18:06:14

the bad thing I don´t like in that is when to use #js , but I use convertions all the time

Aron19:06:23

I haven't used #js yet, what's it for?

wilkerlucio19:06:52

to create literal JS objects and arrays

wilkerlucio19:06:20

eg: #js {:foo "bar"} is like {"foo": "bar"} in JSON

Aron20:06:28

thank you