Error boundries might help, if someone is using them, but if you're not using error boundaries we shouldn't ever attempt to unmount a single component instance more than once.
https://jsfiddle.net/fxq44m0t/
The only reason it's not an infinite loop is that we eventually run out of stack space :P. With good tail recursion in the JSVM, this could become an infinite loop.
Anyway, this is more than a contrived example, because the ReactRouter+redux combination creates situations where this type of thing happens.
Error boundries might help, if someone is using them, but if you're not using error boundaries we shouldn't ever attempt to unmount a single component instance more than once.
https://jsfiddle.net/fxq44m0t/
The only reason it's not an infinite loop is that we eventually run out of stack space :P. With good tail recursion in the JSVM, this could become an infinite loop.
Anyway, this is more than a contrived example, because the ReactRouter+redux combination creates situations where this type of thing happens.