Closed kangju2000 closed 3 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
suspensive.org | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 27, 2024 5:25pm |
v1.suspensive.org | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 27, 2024 5:25pm |
visualization.suspensive.org | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 27, 2024 5:25pm |
Latest commit: 4c789e606fb830835cf8afef13bc18123830fa2d
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
Comparing improve-sandpack
(4c789e6) with main
(990058f)
:warning: No benchmarks were detected in both the base of the PR and the PR.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 80.88%. Comparing base (
990058f
) to head (4c789e6
).
related #7
Overview
Add examples to the ErrorBoundary documentation using sandpack.
Changes
Details
Changed the template from
vite-ts
toreact-ts
to improve initial loading speed.The
react-ts
template is based on Create React App (CRA), which shows thereact-error-overlay
when an error occurs. This overlay prevents the fallback UI from being displayed immediately. To fix this, I set thereact-error-overlay
todisplay: none
.Additionally, Sandpack has its own error overlay. To handle errors more effectively and ensure the fallback UI is displayed correctly, I customized the ErrorOverlay to not appear when an error is thrown.
The rest of the logic was taken from Sandpack's source code: Sandpack.tsx.
PR Checklist