Subscribe on changes!

onActivated not work well with async component

avatar
Apr 4th 2022

Version

^3.2.31

Reproduction link

stackblitz.com

Steps to reproduce

  1. Open console
  2. Home component logs that it was activated and mounted
  3. Change tab to Post or Archive
  4. Only mounted function is run
  5. Change between tabs, both activated and mounted function are running now

What is expected?

The docs say:

onActivated is also called on mount, and onDeactivated on unmount.

What is actually happening?

onActivated is not called on the first time component is mounted. The function works well with normal/sync component

avatar
Apr 4th 2022

duplicate of #5651