slidevjs / slidev

Presentation Slides for Developers
https://sli.dev
MIT License
31.94k stars 1.26k forks source link

`onBeforeUnmount` never called #1679

Open louwers opened 2 weeks ago

louwers commented 2 weeks ago

Describe the bug I would expect onBeforeUnmount to be called when the next slide is shown and a component goes off screen. However, it isn't, and there is no information about the Vue lifecycle in the documentation.

To Reproduce Steps to reproduce the behavior:

  1. Create a custom component, call the onBeforeUnmount lifecycle function
  2. Add it to a slide
  3. Observe that it is never called

Desktop (please complete the following information):

louwers commented 2 weeks ago

I can work around this with https://github.com/slidevjs/slidev/issues/1550

But it would still be good to mention that Vue's usual lifecycle hooks don't apply.