Build a reusable modal with a portal
Handle opening, closing, escape, outside clicks, focus restoration and accessible labelling.
Implementation Requirements & Edge Cases
- Handle opening, closing, escape, outside clicks, focus restoration and accessible labelling.
Interview Evaluation Criteria
- Clarify constraints, API shape, error handling, and asynchronous edge cases upfront.
- Verify keyboard accessibility, clean state modeling, and zero memory/timer leaks where applicable.
- Discuss time/space tradeoffs and write test cases covering empty, invalid, and boundary inputs.
Module Context & References
React · Components & state Composition, state modeling, performance and data fetching
Personal Notes · Markdown