[Docs] destroy() #4690
Closed
lonix1
started this conversation in
3. Feature Ideas
Replies: 1 comment 1 reply
-
|
Actually I just found a docs page that mentions this behaviour: https://alpinejs.dev/globals/alpine-data#destroy-functions Does that apply to |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I searched many issues and discovered that one can add a function
destroy()tox-dataorAlpine.data(), and it will be called when a component is removed from the DOM.However it's not documented. I'm worried that until it's documented it's not official behaviour and can be changed at any time and break our code.
I can't submit a PR for this because I'm still unsure how to use it. There seem to be various issues with it (unless those are from older issues?) A little confusing, so should be documented.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions