Closed berekuk closed 7 months ago
Latest commit: 7b938ac206f1dd591ef189cbc24b9b8700e4899f
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
quri-hub | ✅ Ready (Inspect) | Visit Preview | Feb 2, 2024 8:30pm |
squiggle-website | ✅ Ready (Inspect) | Visit Preview | Feb 2, 2024 8:30pm |
Fixes #3014.
What happened:
use(versionedSquigglePackages)
, which callsawait import(...)
await import(...)
looks instant when the dependency is already imported, but still works as a promise under the hood<Suspense>
boundary, i.e. theloading.tsx
So next-auth caused this because it causes re-renders on tab changes, but next-auth is not the problem here. Same problem also happened when you switched Squiggle versions (even if the version was loaded,
use(...)
still suspended)One remaining issue here is related to SSR: on the initial load, the current sequence is: 1) SSR HTML, which shows some parts of the playground (but not CodeMIrror), because
await import
resolves on SSR immediately 2) then it suspends on the browser sideuse(versionedSquigglePackages)
loads Squiggle lazily 3) then the full playground is rendered again