Closed jungpaeng closed 4 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
overlay-kit | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 17, 2024 4:39pm |
Latest commit: 6ba184eeec88a58056c2cba8af1f64ec344dfcbe
The changes in this PR will be included in the next version bump.
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
This commit adds a useEffect cleanup function to the OverlayProvider component that dispatches a ‘REMOVE_ALL’ action upon unmounting. This ensures that overlays are properly cleaned up during testing scenarios, preventing state leakage and side effects from persistent overlays.
Description
This commit introduces a useEffect cleanup function in the OverlayProvider component that dispatches a 'REMOVE_ALL' action when the component unmounts. This change ensures that all overlays are properly cleaned up during testing scenarios, preventing state leakage and side effects from persistent overlays.
Related Issue: Fixes #63
Changes
OverlayProvider
to dispatch 'REMOVE_ALL' on unmount.Motivation and Context
This change is necessary to enhance the testability of the OverlayProvider by ensuring overlays do not persist state across tests, which can lead to unpredictable behavior and flaky tests.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist
Further Comments