When the user of my application clicks logout, I send them to a logout route. The “activate” method of the logout route sends a request to the server, clears session data using multiple
unloadAll calls, and sets a timeout to redirect to the index route. The “deactivate” method clears the timeout, in case the user navigated away early. The logout route displays an appropriate message.
Sometimes the logout route fails. The “activate” hook is called, but never finishes. The “loading” route is displayed. No exceptions are shown in the console, but I used devtools to find “Attempted to handle event
unloadRecord on … while in state root.loading.”
Is it true, I cannot call
unloadAll from inside the activate hook? Why is this?
Thanks : ) Matt