You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure the exact cause why, but very similar to #144 , as part of refactoring down Greenwood towards Single File Executables noticed in this demo PR that given a very specific set of steps
Load products page (SSR page)
Load home page and click load products (API route)
Load search page and search, e.g. phone (API route)
Load products page
Expected: page would load like in step 1
Actual: custom element initialization keeps happening until eventually the API we're calling gives up and stops return data
greenwood-sfe-ssr-infinite-loop.mov
Details
As you can see above, renderToString gets called and then initializeCustomElement happens almost 100 times and finally the upsteam API just gives up
I also wonder wonder why over multiple loads this would be an issue, but not presumably defining something like HTMLElement wouldn't error out? Node should cache modules, which would explain the HTMLElement behavior at least but not the observed behavior seen here. 🤷♂️
Spoiler alert, a solution was found that involved making the DOM Shim a bit more idempotent which seemed to make the issue go away
thescientist13
changed the title
reloading DOM shim leads to infinite rendering issue
duplicate loads of the DOM shim leads to infinite rendering issue
Feb 19, 2024
thescientist13
changed the title
duplicate loads of the DOM shim leads to infinite rendering issue
duplicate loads of the DOM shim leads to an infinite rendering issue
Feb 19, 2024
Summary
Not sure the exact cause why, but very similar to #144 , as part of refactoring down Greenwood towards Single File Executables noticed in this demo PR that given a very specific set of steps
greenwood-sfe-ssr-infinite-loop.mov
Details
As you can see above,
renderToString
gets called and theninitializeCustomElement
happens almost 100 times and finally the upsteam API just gives upWe should probably include this as part of #145.
I also wonder wonder why over multiple loads this would be an issue, but not presumably defining something like
HTMLElement
wouldn't error out? Node should cache modules, which would explain theHTMLElement
behavior at least but not the observed behavior seen here. 🤷♂️Spoiler alert, a solution was found that involved making the DOM Shim a bit more idempotent which seemed to make the issue go away
The text was updated successfully, but these errors were encountered: