We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
yyx990803
Learn more about funding links in repositories.
Report abuse
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
3.2.39
https://sfc.vuejs.org/#eNqNUstu2zAQ/JUtL5KBSESbUw1ZcB8o0Hvaky62tLJZiw/w4TQw9O9dio7qKkGRmzS7nJndnQv7ZEx5DsjWrPIozbDzWDcKoNoH77WCbTuI9rRpmNeHw4ANqx+mj4qnhtT8RUsD50L01CjcT+HEPvZyqlb8hpd+XWuF8eDQB0OIkEZbDxew2MMIvdUSMjKUzaWJO+Eljz/RL5UBGtVq5TzMirCJNLm3AVdRrA+q9YKmSObzFVziu7m/PO+GEF+9W0CNGqPz5LVmdyx5KeTOlL+cVrSuiYmmnQquYevEHTHyF/8bdvTeuDXnQZnToWy15FuqcRuUFxKLTsvtffmhvP/IO+H8LV6ik8Xe6keHlhQbdndDzgk8oy0sqg4t2v+KLXr/EVzUXohGTVrESAt4XvzLoJj6O53zqMPQwaAPIGjdR4R4Gk0nQVJ4gjgXwcIRThtTqOLZICipaWjsKh7D8NasaPUZe23xR3r+em4uIJ++UQDmaknsztNg1NMozuGrRqcyD4/antbQ7obBTdbn2Gg1kHVC3lPK4giNWkjnSYPSFuNInA9xxkjoXmX8u43YvSSjgG7qq+18RaS3EbyapwPg72nAmfT5QUrgdfEl3SLPUikjqpGNfwDSdWIu
Import a function from another file in a component and pass it to onBeforeUnmount hook directly (without creating an anonymous function)
onBeforeUnmount
Every time the component is unmounted it should call the imported function
It's only calling the imported function the first time the component is unmounted
No response
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())
onBeforeUnmount(myFunc)
onBeforeUnmount(() => myFunc())
The text was updated successfully, but these errors were encountered:
fix(runtime-core): Lifecycle hooks should support callbacks shared by…
2fad93c
… reference fix: #6686
c71a08e
… reference (#6687) fix #6686
42bf713
… reference (vuejs#6687) fix vuejs#6686
Successfully merging a pull request may close this issue.
Vue version
3.2.39
Link to minimal reproduction
https://sfc.vuejs.org/#eNqNUstu2zAQ/JUtL5KBSESbUw1ZcB8o0Hvaky62tLJZiw/w4TQw9O9dio7qKkGRmzS7nJndnQv7ZEx5DsjWrPIozbDzWDcKoNoH77WCbTuI9rRpmNeHw4ANqx+mj4qnhtT8RUsD50L01CjcT+HEPvZyqlb8hpd+XWuF8eDQB0OIkEZbDxew2MMIvdUSMjKUzaWJO+Eljz/RL5UBGtVq5TzMirCJNLm3AVdRrA+q9YKmSObzFVziu7m/PO+GEF+9W0CNGqPz5LVmdyx5KeTOlL+cVrSuiYmmnQquYevEHTHyF/8bdvTeuDXnQZnToWy15FuqcRuUFxKLTsvtffmhvP/IO+H8LV6ik8Xe6keHlhQbdndDzgk8oy0sqg4t2v+KLXr/EVzUXohGTVrESAt4XvzLoJj6O53zqMPQwaAPIGjdR4R4Gk0nQVJ4gjgXwcIRThtTqOLZICipaWjsKh7D8NasaPUZe23xR3r+em4uIJ++UQDmaknsztNg1NMozuGrRqcyD4/antbQ7obBTdbn2Gg1kHVC3lPK4giNWkjnSYPSFuNInA9xxkjoXmX8u43YvSSjgG7qq+18RaS3EbyapwPg72nAmfT5QUrgdfEl3SLPUikjqpGNfwDSdWIu
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())
The text was updated successfully, but these errors were encountered: