Remove script from head onUnmounted #27107
Unanswered
Logannford
asked this question in
Questions
Replies: 1 comment 1 reply
-
@Logannford Seems to me the script is automagically removed when the component is unmounted. |
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
-
I have a very niche use case where I need to add a script tag to the head on mount, then remove it on unMount so whenever the component is mounted it is re-added.
For some context I am using Typeform and need to re-add the embed script to the head on every instance of a component mounting within my application.
Below is a snippet of the component that needs to add/remove the script tag.
Any help is appreciated! 🙏
Beta Was this translation helpful? Give feedback.
All reactions