om

Please ask the channel first, not @dnolen directly!
souenzzo 2017-10-01T01:40:58.000002Z

Om is underdocumented. There is some github project to use as ""reference""?

souenzzo 2017-10-01T04:14:48.000050Z

Is common call a defui inside another defui? Examples?

levitanong 2017-10-01T10:42:20.000061Z

@souenzzo Probably an antipattern. there is ui which you can use anonymously. defui is a global definition.

levitanong 2017-10-01T10:42:53.000039Z

https://github.com/anmonteiro/om-next-fullstack is a good reference

levitanong 2017-10-01T10:43:12.000066Z

you could also help out by listing out what needs extra documentation

levitanong 2017-10-01T10:43:24.000022Z

and then those of us who are familiar can fill those out for you.

levitanong 2017-10-01T10:43:30.000050Z

and then it’ll be less underdocumented!

wilkerlucio 2017-10-01T13:02:36.000024Z

when you create a custom component that take children, every time I do this with Om.next in end up in those react key situations, but I don't really understand it, if by doing the regular dom/div I can place items without key, why that doesn't work when I try (apply dom/div nil children)? Is there a way around it?

sundarj 2017-10-01T15:38:34.000010Z

have you read this? https://reactjs.org/docs/lists-and-keys.html

wilkerlucio 2017-10-01T15:59:41.000040Z

thanks @sundarj, but I did, and this is a different problem, the one mentioned in this article is when you have variable list of elements, in my case it's more like just fixed siblings, just layouting, not dynmic elements

wilkerlucio 2017-10-01T16:00:28.000111Z

in om.dom for example, it's totally ok to do this:

(dom/div nil
  (dom/div nil "a")
  (dom/div nil "b"))

wilkerlucio 2017-10-01T16:00:48.000002Z

code-wise, this should be equivalent:

wilkerlucio 2017-10-01T16:01:17.000025Z

(apply dom div nil
  [(dom/div nil "a") (dom/div nil "b")])

wilkerlucio 2017-10-01T16:01:23.000044Z

shoudn't?

wilkerlucio 2017-10-01T16:02:13.000008Z

I mean, react keys solves when have the possibility to move those nodes around, but for the regular static case I think auto-keys can be safely assigned/are not needed

sundarj 2017-10-01T16:04:36.000100Z

i was under the impression that you should always add keys, even if only for perf reasons

sundarj 2017-10-01T16:07:38.000038Z

i guess that is also about adding elements though

sundarj 2017-10-01T16:07:55.000058Z

if they are static it shouldn't matter, you're right

levitanong 2017-10-01T17:28:59.000027Z

@wilkerlucio I think it really is a different case if you’re passing a vector. There’s no guarantee that this data structure could change in the future.