Skip to content

Improve the description of【beforeCreate】  #2706

Closed
@Nicklaus6

Description

@Nicklaus6

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions