The dismiss function is automatically injected by Reoverlay your modal component doesnt need to know anything about the overlay system to close itself. This is what React declarative modals should feel like: you describe what to show and with what data, and the library handles the rest.
react-modal alternatives and similar libraries Based on the "Overlay" category. Alternatively, view react-modal alternatives based on common mentions on social networks and blogs.

Many product managers use modal, pop-up, and overlay interchangeably to describe UI elements that sit on top of the interface. But each pattern serves a distinct purpose, so blurring the lines can confuse designers and lead to misaligned UX implementations. In this guide, Ill clarify the differences between modal vs popup vs overlay, outline when each pattern works best, and help you choose ...

Furthermore, visual representations like the one above help us fully grasp the concept of Modal Overlay Replacement.
Basic re-frame recipe for creating modal/dialog/overlay panels. This implementation is pure re-frame and css, free from jQuery and DOM manipulation and can be used as a drop-in replacement for Bootstrap modals.
