@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
how would you go about render props in helix?
you can pass functions as props in helix as well, what is the issue?
oh I didnt say there's an issue. but how can you pass a function as children? I mean, what's the syntax?
I'm still getting used to the language.
Helix is a minimal React wrapper, so it doesn’t try to impose new conventions, just helps you write React in idiomatic Clojurescript.
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
got it. thanks
@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
the bad thing I don´t like in that is when to use #js
, but I use convertions all the time
I haven't used #js yet, what's it for?
to create literal JS objects and arrays
eg: #js {:foo "bar"}
is like {"foo": "bar"}
in JSON
thank you