Clojurians
# om

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

mattly 02:05: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

mattly 02:06:05

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

mattly 02:06:24

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

mattly 02:27:55

I kinda regret going with Om now

dnolen 02:31:23

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

dnolen 02:31:28

@mattly: ^

dnolen 02:31:59

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

dnolen 02:32:33

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

dnolen 02:33:09

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

mattly 02:33:55

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

dnolen 02:34:28

an alternate pattern is possible via multimethods

mattly 02:34:31

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

mattly 02:34:49

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

dnolen 02:35: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:

mattly 03:09:24

well, looking forward to it