What is the order in which vue components are created?

A problem encountered in the previous project: the order in which components were created during page initialization was not fixed, resulting in uncontrollable timing for different components to get data from the back end.

how should this be avoided?

Mar.05,2021

1. I don't know in which life cycle the order in which the components are created is not fixed.
2. If you have sequential requirements, you can store the flag of whether each component has been created in vuex, and judge this flag before the related components request data

.
Menu