Skip to content
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

[compat] Lifecycle hooks are broken when using Vue.extend #3761

Closed
CyberAP opened this issue May 11, 2021 · 0 comments · Fixed by #3762
Closed

[compat] Lifecycle hooks are broken when using Vue.extend #3761

CyberAP opened this issue May 11, 2021 · 0 comments · Fixed by #3762

Comments

@CyberAP
Copy link
Contributor

CyberAP commented May 11, 2021

Version

3.1.0-beta.2

Reproduction link

https://codesandbox.io/s/unruffled-mclaren-310ge?file=/src/main.js

Steps to reproduce

  1. Use Vue.extend to define a component with lifecycle hooks
  2. Mount this component anywhere

What is expected?

Lifecycle hooks should work

What is actually happening?

Component does not render and hooks don't trigger at all


This does produce a runtime error when trying to use a component that was defined via Vue.extend:

Uncaught TypeError: beforeMount.bind is not a function
    at applyOptions
@CyberAP CyberAP changed the title [vue-compat] Lifecycle hooks are wrapped into array when using Vue.extend [vue-compat] Lifecycle hooks are broken when using Vue.extend May 11, 2021
@CyberAP CyberAP changed the title [vue-compat] Lifecycle hooks are broken when using Vue.extend [compat] Lifecycle hooks are broken when using Vue.extend May 11, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant