Open hyperh opened 6 years ago
Late reply, but for anyone else wondering, as a workaround exclude <NotificationContainer />
from rendering on the server by rendering it conditionally after parent component has been mounted:
(componentDidMount is not called during SSR)
class Parent extends React.Component {
constructor() {
super();
this.state = {
mounted: false,
}
}
componentDidMount() {
this.setState({ mounted: true });
}
render() {
return (
<div>
// rest of component
{this.state.mounted && <NotificationContainer /> }
</div>
)
}
}
I have a server side rendered app, and on my Express server, I'm getting the following error (sometimes):