Fork me on GitHub
#fulcro
<
2021-07-12
>
lgessler17:07:57

just writing this here so it'll be googlable for posterity: I ran into a Cannot find app on component! bug that only appeared in a production build (exactly the same symptoms as https://clojurians-log.clojureverse.org/fulcro/2021-03-31/1617206490.277800), and the culprit turned out to be having (map ui-foo props) where I needed to have (doall (map ui-foo props)) within a component's body

👍 2
lgessler18:07:10

as an aside, i'm pretty puzzled that this worked in a dev but not a prod build! wondering what's to explain it

tony.kay18:07:27

Production react doesn't do any error checking on the children. Development mode does. In development mode that checking causes a forced evaluation. The normal Dom stuff forces children as well, so it is difficult to run into this particular problem unless you're lazy sequence isn't embedded within a dom call.

👍 2
lgessler18:07:55

i see--yeah, in my fulcro components where this was happening, I wasn't using any fulcro dom elements, so that would do it i suppose

Jakub Holý (HolyJak)08:07:16

You could also use mapv, which isn't lazy...

👍 2