i tend to end up with errors like this in my release builds for our react native project. does this have to do with the :infer-externs
flag?
E/unknown:ReactNative: MyAppImpl caught native exception
com.facebook.react.common.JavascriptException: TypeError: u(BY).Il is not a function. (In 'u(BY).Il(q.a(n))', 'u(BY).Il' is undefined), stack:
@benny yes, thats a typical externs error
With :target :react-native
where would I put files to load on demand via (js/require "data.json")
? Is there some assets/resource path to configure?
in shadow-cljs no, in react-native I don't know. just js/require
the file with a relative path to the output file
I imagine with react native it would be similar to how fonts are bundled -- so i think something in both ios and android folders
is the solution for it to just change :infer-externs
to false!
?
the solution is add ^js
typehints where required. :infer-externs false
just turns of the warnings. see https://shadow-cljs.github.io/docs/UsersGuide.html#infer-externs