3 ms·
Alternatively, how many modals can be open at any given time? And is it a floating element? May be an option to make it a global single instance thing then, set
by Cthulhu_ 1y ago
Alternatively, how many modals can be open at any given time? And is it a floating element? May be an option to make it a global single instance thing then, set the content when needed. Allows for in/out transitions, too, as another commenter pointed out. See also "Portals" in React.
- adithyassekhar 1y agoThere is only one. Won't contexts cause rerenders through the tree? We already use portals. It's just each modal have complex logic inside them that they're their own component.