You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Called immediately when the instance is initialized, after props resolution, before processing other options such as data() or computed.
After reading the source code, I find the description on the document is some ambiguous and can lead to misunderstanding. Because initState is called after beforeCreate called, and initProps is called in the initState, which means the props resolution is before beforeCreate but the props initialization if after that. In initProps, the props are defined as reactive properties.
Thus, I hope the document can be clearer and more accurate, helping users to better learn and use Vue.
The text was updated successfully, but these errors were encountered:
Nicklaus6
changed the title
Improve the description of【BeforeCreate】
Improve the description of【beforeCreate】
Feb 21, 2024
https://vuejs.org/api/options-lifecycle.html#beforecreate
After reading the source code, I find the description on the document is some ambiguous and can lead to misunderstanding. Because
initState
is called afterbeforeCreate
called, andinitProps
is called in theinitState
, which means the props resolution is beforebeforeCreate
but the props initialization if after that. IninitProps
, the props are defined as reactive properties.Thus, I hope the document can be clearer and more accurate, helping users to better learn and use Vue.
The text was updated successfully, but these errors were encountered: