Loading state when going back to parent route


#1

I have a nested route, let’s call it A.B.C. A.B has a slow-loading model, and hence I created A.B.loading to handle it and show an appropriate indication to the user.

Once A.B.C is entered though, and the user clicks back to A.B, it seems like the loading substate isn’t entered, and the user experiences a “freeze” in the UI without any loading indication.

Is this the expected behavior? What am I doing wrong?

Thanks in advance


#2

When you transition from A.B.C to A.B, you’re really transitioning from A.B.C to A.B.index. The A.B route remains stable and it shouldn’t be loading the model again.

Perhaps there is something else slow that is happening that is causing the delay.


#3

That’s weird. My slow model is definitely on A.B, and yet there is a noticeable lag when clicking back to A.B. I’m not sure if the actual link-to is to A.B.index or A.B, but according to what you say it shouldn’t matter…