Commit 7f621324 authored by Tomas Carnecky's avatar Tomas Carnecky Committed by Tim Neutkens

Set `this.mounted` to false when dynamic component is unmounted (#4333)

Otherwise you may get a React warning about calling setState() on an unmounted component.
parent d3c710b3
......@@ -137,6 +137,10 @@ export default function dynamicComponent (p, o) {
this.loadBundle(nextProps)
}
componentWillUnmount () {
this.mounted = false
}
render () {
const { AsyncComponent, asyncElement } = this.state
const { LoadingComponent } = this
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment