fix: wrap preview in boundary
Description
React-Live did not catch a runtime error (not caught in the transpile phase).
We can't catch all errors (like event handlers) but we can catch useEffect's cleanup functions.
Fixes # (issue)
https://github.com/user-attachments/assets/7fa18a71-e688-406b-aa98-9f526518fa43
The above video demonstrates, not a cleanup function not causing crash.
Worth noting, cleanup function runs one cycle "behind", therefore even if we correct the code the previous code with error still shows up.
Type of Change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How Has This Been Tested?
Checklist: (Feel free to delete this section upon completion)
- [ ] I have included a changeset if this change will require a version change to one of the packages.
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] I have run all builds, tests, and linting and all checks pass
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] My changes generate no new warnings
- [ ] Any dependent changes have been merged and published in downstream modules
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| react-live-docs-website | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 19, 2024 3:39pm |
🦋 Changeset detected
Latest commit: 4761252664122536a917236c858684c5207bf44b
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| react-live | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Working on some minor changes here, will update shortly
Causes a regression on #393