Skip to content

[Suggestion]: portals caveat #7450

Open
@o-t-w

Description

Summary

The problems solved by portals can also be solved by the dialog element, popover API and anchor positioning.

I think it is worth mentioning that on the page less people think the only approach is to use portals.

Page

https://react.dev/reference/react-dom/createPortal

Details

I wrote about it here: https://fullystacked.net/portal/

I don’t think native popovers are perfect. There will probably always be a need for this portal API, but I think the main example shouldn’t be a modal. That genuinely is better solved with the native HTML element.

I’m not suggesting a large new section, just a brief note to say there are other approaches.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions