-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Closed
Labels
🐞 bugSomething isn't workingSomething isn't working
Description
Vue version
3.2.39
Link to minimal reproduction
Steps to reproduce
Import a function from another file in a component and pass it to onBeforeUnmount
hook directly (without creating an anonymous function)
What is expected?
Every time the component is unmounted it should call the imported function
What is actually happening?
It's only calling the imported function the first time the component is unmounted
System Info
No response
Any additional comments?
in the reproducible example there is a commented line showing what I need to do for it to work (create an anonymous function)
❌ onBeforeUnmount(myFunc)
✅ onBeforeUnmount(() => myFunc())
Metadata
Metadata
Assignees
Labels
🐞 bugSomething isn't workingSomething isn't working
Activity
fix(runtime-core): Lifecycle hooks should support callbacks shared by…
fix(runtime-core): Lifecycle hooks should support callbacks shared by…
fix(runtime-core): Lifecycle hooks should support callbacks shared by…