Subscribe on changes!

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

avatar
May 11th 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