ionic-views icon indicating copy to clipboard operation
ionic-views copied to clipboard

Switching views in the render method triggers an unmounted render

Open Hexxeh opened this issue 7 years ago • 0 comments

If you have views A and B, where A has two subviews (C and D), if subview C's onRender method calls Application.switchTo, views A, C and D will be unmounted and view B rendered, but then immediately afterwards subview D's render method will be called (which if it expects view state to be in place from mounting, will blow up).

One potential fix might be to switch states using setImmediate to ensure the current call chain completes first.

Hexxeh avatar Nov 05 '18 11:11 Hexxeh