In the Om.next wiki, there is example code like this (code listing at the bottom of the linked page):
(apply dom/ul nil
(map person list))
Since dom/ul
takes a variable number of arguments, what is the benefit of using apply
vs this:
(dom/ul nil (map person list))
This second approach seems more analogous to passing an array as children
in vanilla React, which is supported.
Actual question (response to comment): Is apply
necessary? If so, why doesn't the latter approach work? If not, what benefit is gained from using apply
like in the example?