Fork me on GitHub
#om
<
2017-06-08
>
swlabrtyr05:06:07

Hey everyone, I’d really like to get into om, however I do not know react. I do know JavaScript pretty well, and am not averse to learning react, however I’d rather just get right into om if I can. I’ve searched around the interwebs for answers and most people seem to say that no, you can just jump into om, however I am a bit skeptical…

danielstockton05:06:25

I would say you can definitely jump straight into om and pick up bits of react along the way. You really only need to understand the basics of react i.e. the main lifecycle methods and the difference between state and props.

symfrog17:06:52

I am trying to use "placeholder nodes" (https://github.com/omcljs/om/issues/823#issuecomment-260164185) as a workaround for multiple child components that need different views of a parent attribute (https://github.com/omcljs/om/issues/823) . Everything (mutations, path metadata, component refresh etc.) works correctly in the subcomponent, except for dynamic queries and the use of set-query! in the subcomponent. The use of set-query! results in a

Cannot read property 'call' of null
exception. I have created a minimal case using 1.0.0-beta1 that reproduces the issue here: https://gist.github.com/symfrog/75bf8955722b26cd4370989dace60e2e . If the call to update-query! on line 23 (https://gist.github.com/symfrog/75bf8955722b26cd4370989dace60e2e#file-placeholders-cljs-L23) is removed, then the issue does not occur. The issue seems to be related to reindexing after update-query! has been invoked for components for which the parent pulls the subcomponent's query into its own query at a level deeper than the 1st level. Does anyone know what the cause might be?

symfrog13:06:15

I have narrowed the minimal case (https://gist.github.com/symfrog/75bf8955722b26cd4370989dace60e2e) further down, to me it seems like an om bug, I will go ahead and open an issue unless someone can see something that I am missing?