-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add cleanup effect for unmounting (#64)
* feat: Add cleanup effect for unmounting 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. * Create brown-boxes-wink.md
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"overlay-kit": patch | ||
--- | ||
|
||
feat: Add cleanup effect for unmounting | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters