preact-portal
preact-portal copied to clipboard
Suggestion: blocking scroll
Inspired by the use case of blocking scroll (also https://github.com/reactjs/react-modal/issues/60)
Should we consider adding events into Preact Portal or make it add a class to the into? events such as onMount, onUnmount (to their respective preact methods,) or a preact-portal__shown class...
I'm just asking, I'm creating my own component that extends PreactPortal to achieve this. Wondering if it's a valid use case.
Not likely a feature we'd build into Portal, but into a modal lib that uses it. Portal is used for more than modals - I use it to render meta tags in <head>.