Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

most common use cases of portals in react

A typical use case for portals is when a parent component has an overflow: hidden or z-index style, but you need the child to visually “break out” of its container. For example, dialogs, hovercards, and tooltips. Note: When working with portals, remember that managing keyboard focus becomes very important.
 
PREVIOUS NEXT
Tagged: #common #cases #portals #react
ADD COMMENT
Topic
Name
9+9 =