Closed casoetan closed 6 years ago
Ran into same problem just now. Looks like the way to solve this is to re-render like this https://codepen.io/bastianalbers/pen/PWBYvz
Thanks @k1tzu But here is how I solved this with dynamic imports. First
let PopupComponent
import('react-popup').then(module => {
PopupComponent = module.default
})
Then this in your render or wherever needed
<>
{PopupComponent && <PopupComponent />}
{PopupComponent && PopupComponent.alert('Whatever you want')}
</>
Trying to use this with a server render react app, but it blows up.
The problem seems to be with keymaster. Anyway to turn that off?