fix(aot): Unmount AlwaysOnTop to remove listeners (#2307)

This commit is contained in:
hristoterezov 2017-12-18 16:35:56 -06:00 committed by virtuacoplenny
parent eee87bc546
commit d6c3ab64fa
1 changed files with 4 additions and 0 deletions

View File

@ -8,3 +8,7 @@ ReactDOM.render(
<AlwaysOnTop />,
document.getElementById('react')
);
window.addEventListener('beforeunload', () => {
ReactDOM.unmountComponentAtNode(document.getElementById('react'));
});