Closed theniceangel closed 4 years ago
in runtime-core package, setup is called in setupStatefulComponent, then in finishComponentSetup function, `applyOptions' will be excuted for the sake of compatibility about 2.x options, where 'beforeCreate' lifecycle will be excuted.
runtime-core
setup
setupStatefulComponent
finishComponentSetup
So, setup is called before beforeCreate hook
beforeCreate
Hey @theniceangel, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚
in
runtime-core
package,setup
is called insetupStatefulComponent
, then infinishComponentSetup
function, `applyOptions' will be excuted for the sake of compatibility about 2.x options, where 'beforeCreate' lifecycle will be excuted.So,
setup
is called beforebeforeCreate
hook