(om/build comp1 (f cursor))
has the same effect as (om/build comp1 cursor {:fn f})
So the answer is that it really depends what f
does. As long as (f x)
(or its content) is still a cursor, you can om/transact!
or om/update!
on it (or its content).
For example, if x
is {:x 1}
and f
is #(update-in % [:x] inc)
, f
will apply on the value of the cursor; the underlying atom will not change. When you om/transact!
or om/update!
on (f x)
it'll operate on the atom inside cursor x
. On the next render, you'll once again get (f x)
based on the updated x
.
On the other hand, if f
makes x
not a cursor (e.g. f
is om/value
), then you won't be able to om/transact!
or om/update!
on it at all.
Hope that helps.