iamhosseindhv / notistack

Highly customizable notification snackbars (toasts) that can be stacked on top of each other
https://notistack.com
Other
3.93k stars 299 forks source link

Extend functionality with `createPortal` approach #178

Closed PeterMK85 closed 5 years ago

PeterMK85 commented 5 years ago

To able to target the root html element, the render place of notistack

PeterMK85 commented 5 years ago

First glance plan: Something like an optional prop to the provider, and if that exist, on the return, it should render into the defined selector element https://github.com/iamhosseindhv/notistack/blob/master/src/SnackbarProvider.js#L201

More about portals: https://reactjs.org/docs/portals.html

PeterMK85 commented 5 years ago

@iamhosseindhv wdyt?

iamhosseindhv commented 5 years ago

closing as corresponding PR is under review https://github.com/iamhosseindhv/notistack/pull/179