Katja (katywings)
onMount randomly not called
From what I can tell so far, this fixed both of my issues 🥳
- the effects (including onMount) ran reliably in all 30 tries (tab reloads) - link hover during hydration doesn't break the app anymore I gonna deploy it to prod next and make there a couple more runs 🙂 Edit: still no issues, after further use throughout the afternoon 🎉
- the effects (including onMount) ran reliably in all 30 tries (tab reloads) - link hover during hydration doesn't break the app anymore I gonna deploy it to prod next and make there a couple more runs 🙂 Edit: still no issues, after further use throughout the afternoon 🎉
130 replies
onMount randomly not called
Found a temporary workaround by reloading the page, if the effect did not run before document
onload
. Not happy about this but remarkable times sometimes ask for remarkable workarounds I guess 🙈. (https://codeberg.org/nitropage/nitropage/commit/63dd2ac23c25f4706985dc396b4d2a849294661e)130 replies
onMount randomly not called
Okay, just checked this, when the bug happens it skips all effects of said component, not only the onMount. And the component function itself is not skipped (e.g. console.logs in the component function are executed)
Just in case, this is the component where it is happening: https://codeberg.org/nitropage/nitropage/src/commit/bab5a12117781be480b7b4504d4416d64832db3c/packages/nitropage/src/components/admin/index.tsx#L36
130 replies
Caching server-side render results
Holy moly! The onBeforeResponse middleware even receives the body as a string because nitro awaits the promise in async mode. I can lower the server html response times with this from 220ms to 4ms 😱. (Tested locally with an sqlite database)
25 replies