preact-portal icon indicating copy to clipboard operation
preact-portal copied to clipboard

Suggestion: blocking scroll

Open tomasdev opened this issue 8 years ago • 1 comments

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.

tomasdev avatar Nov 30 '17 00:11 tomasdev

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>.

developit avatar Jan 15 '18 16:01 developit