Skip to content

Improve the description of【beforeCreate】 #2706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Nicklaus6 opened this issue Feb 21, 2024 · 0 comments
Closed

Improve the description of【beforeCreate】 #2706

Nicklaus6 opened this issue Feb 21, 2024 · 0 comments

Comments

@Nicklaus6
Copy link
Contributor

https://vuejs.org/api/options-lifecycle.html#beforecreate

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.

image
image

Thus, I hope the document can be clearer and more accurate, helping users to better learn and use Vue.

@Nicklaus6 Nicklaus6 changed the title Improve the description of【BeforeCreate】 Improve the description of【beforeCreate】 Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant