Portals, focus and layering
Comes up in: React, Machine coding
This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.
What it covers
createPortalfor modals/toasts- events bubble through the React tree not the DOM tree
- focus trap and return focus
- native
<dialog>/popover vs portals
Words you will know
What you will practise
- toast system with portal
Interview questions this answers
- How do events behave in a portal?