How asurance/openify works
Openify is a small React utility for opening modal-like components imperatively and receiving their results as promises. A consumer wraps a component with openify, renders a Slot with an ID, then calls that slot’s open method; the slot mounts and opens the component, whose close or error callbacks settle the promise. Cancellation closes the mounted component. The graph focuses on the sampled runtime source; the README demonstrates the workflow with a modal, but does not establish a specific modal-library dependency.
Main entry points: Slot.tsx Slot manager · openify.tsx Openable wrapper · index.ts Public API
Components 6
Other components
- React consumer
- Public API
src/index.ts - Openable wrapper
src/openify.tsx - Slot manager
src/Slot.tsx - Wrapped component
- Open promise
Connections 8
- React consumer → Public API: imports
- React consumer → Openable wrapper: wraps component
- React consumer → Slot manager: renders and opens
- Slot manager → Wrapped component: mounts and opens
- Openable wrapper → Wrapped component: renders
- Wrapped component → Slot manager: closes or errors
- Slot manager → Open promise: settles
- React consumer → Open promise: awaits result