What is the sequence of the execution of the created of the vue parent component and the mounted of the child component?

what is the order of execution of the created of the parent component and the mounted of the child component?
if there is in the created of the parent component, then will the created of the child component be executed before the child component mounted

Jun.08,2021

the order of execution is as follows:

  1. parent component created
  2. subcomponent created
  3. subcomponent mounted
  4. parent component mounted

if there are multiple subcomponents:

  1. after the parent component created hook ends, execute the created hook of the child component
  2. the created execution order of multiple child components is the DOM order of child components within the parent component
  3. the mounted order of multiple sub-components cannot be guaranteed, which is related to the complexity of the sub-components
  4. the parent component must not enter the mounted hook until all child components have finished the mounted hook

created is executed when it is created.
mounted is built to execute.
must be created first by the parent. Then create the children, and the children are not finished building. The father has to wait.


the created of the parent component and then the child component mounted


the parent component will not enter the mounted hook until all child components have finished mounted hook

Hello! The official website says, "Note that mounted does not promise that all child components will be mounted together." does this mean that the mounted of the parent component cannot be guaranteed after the mounted of the child component?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaaed4-2013.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaaed4-2013.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?