Hacker News new | past | comments | ask | show | jobs | submit login

It's more general to spawn a portal per component because then you can show multiple popovers at a time, like popovers that are always visible or only go away if you click "Close". So it makes sense to start there for the naive solution.



Yeah I suspect it was probably for this reason, but to answer the parent comment, yes it was required in the sense that it's simply how the Ant Design popover component works (or at least that's how it worked in 2021 which is when I did this).


Right but the dots aren't popovers. The dots trigger popovers. You should have one dot per dot and one popover per popover.

You could certainly make a popover per dot in any react library. It would just be bad to do so.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: