Comments (3)
You’re correct in your observation.
To explain the background of this implementation: initially, during the PoC (Proof of Concept) phase of this library, the add and open steps of the reducer were combined into a single step, and similarly, the close and unmount steps were combined into one.
As a result, calling closeAll would trigger unmountAll immediately afterwards. In very specific scenarios, we noticed an issue where the animation would break. To temporarily fix this, we found that setting the current value helped resolve the issue.
To properly address this animation issue, we later decided to separate the add and open steps, as well as the close and unmount steps.
In other words, now that the close and unmount steps are separated, there’s no longer a need for the current value to point to the last modal. We will update this to point to null instead.
from overlay-kit.
The part you mentioned about overlayId potentially being an empty string was not intentional. It could lead to bugs.
The possibility of overlayId being an empty string could arise when a custom ID is specified. We need to prevent setting an empty string as a custom ID.
from overlay-kit.
Oh, Thank you for your detailed explanation!
I now have a better understanding of the library. 🙇♂️
from overlay-kit.
Related Issues (20)
- [Question] Could we access open state from outside? HOT 11
- overlay의 내부 구현 코드를 보려면 어떻게 해야 하나요?? HOT 2
- overlay-kit only cover 18 at now
- [Feature Request] useOverlay HOT 4
- Modify to manage state outside of React
- Add changeset
- Add useCurrentOverlay, useOverlayData document
- `overlay.close` and `overlay.unmount`'s argument, parameter name matching HOT 4
- Planned Support for React 16.8 and 17 HOT 2
- Is the intended behavior that firing a `close` event does not change `current`? HOT 10
- Suggestion: Prevent `ADD` action if the custom-id already exists. HOT 10
- Suggestion: Stronger support for promise use cases HOT 4
- The possibility of memory leak HOT 7
- [Bug] Unexpected Component Reset on Reopening Overlays without Unmounting
- Enhancing Document Readability
- Question: Intent on how overlay-kit Provider works HOT 2
- Components inside overlay.open do not react properly to external state HOT 3
- Proposal to Modernize Testing Approach with @testing-library/user-event HOT 4
- Adding `OverlayKitProvider` missing error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from overlay-kit.