Fork me on GitHub
#om
<
2015-07-01
>
mattly23:07:15

I’m coming from extensive work in React to Om, and wondering how one is supposed to hand children to components in om/build

mattly23:07:05

and then how you’d go about getting the equivalent of this.props.children in the rendered component

mattly23:07:24

it seems like this is something om leaves as an exercise to the user

mattly23:07:55

I kinda regret going with Om now

dnolen23:07:23

mattly: while Om exposes most of React features, it really has more radical philosophy than React

dnolen23:07:59

was never a huge fan of higher order component pattern due to weird semantics wrt component local state

dnolen23:07:33

fwiw, in Om Next if you really want to do component composition that way it will work

dnolen23:07:09

but from what I can tell it hasn’t really impeded sophisticated Om programs in any whatsoever and not an often requested thing.

mattly23:07:55

maybe I’ll study some of the larger open-source apps some more to see how they’re handling these patterns

dnolen23:07:28

an alternate pattern is possible via multimethods

mattly23:07:31

this will be my third large React app, first with ClojureScript, and I’ve made extensive use of component composition in the past

mattly23:07:49

yeah I’m reading through some of the issues in the github repo

dnolen23:07:23

not saying it’s not a valid complaint, just explaining how it ended up it this way, why it hasn’t changed, and that in the future that pattern will be simple to port if you like simple_smile