Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion]: portals caveat #7450

Open
o-t-w opened this issue Jan 24, 2025 · 0 comments
Open

[Suggestion]: portals caveat #7450

o-t-w opened this issue Jan 24, 2025 · 0 comments

Comments

@o-t-w
Copy link
Contributor

o-t-w commented Jan 24, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant