hey all - is there some way to get my reagent project to NOT use the minified production version of react?
I am seeing some errors that I am having a lot of trouble debugging
coming from react…
but this only happens on the first page load after I rebuild the javascript, EVEN THOUGH the browser is not caching main.js ??
with source maps:
depending on what build tool you're using, you can provide different files for your JS dependencies
is this after a release build?
yeah
but only on the first load, once I serve the file with http-server. it doesn’t seem to happen on first load at , where I’ve deployed the file, either
so it’s a transient local thing? but I don’t get how that could be happening with no caching of the file
I do see G is not a function in my console when I visit that URL
if you reload does it persist?
I also see an error Cannot read properties of null (reading 'create') above it
yeah, I fixed that, that was a separate issue
I don't see it after I reload the page
just haven’t deployed yet
I also don’t see it on safari, just on brave
interesting… so if I DON’T regenerate the file, but simply restart the http-server, then I get that failure again
oh, I think I’ve pinned down what’s going on
I can pretty reliably trigger the error if i open the page without devtools opened in Chrome
Close devtools -> reload -> open devtools -> observe error
it is happening when I try and interact with this defonce form:
all of this code is actually running inside of an sci environment, so something suspicious is happening here
okay, I fixed it by renaming that atom. this feels like something with sci
thanks for staring with me!
@lilactown I figured it out… I was using a useEffect hook and had a code path that returned nil from my mount function, instead of an unmount function.
#helix solves this out of the box for you 😉
looks like in react 18, with advanced compilation, that triggered a bug