What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hey, I'm loading some components asynchronously that have some javascript and render them to the dom

U012MFKV1D5
U012MFKV1D5 Posts: 13 🧑🏻‍🚀 - Cadet

Hey, I'm loading some components asynchronously that have some javascript and render them to the dom. After that I have to call mount to make the javascript work. That works fine if the component hasn't been mounted before. However if the component has been mounted before, it will should be skipped when I call the mount function, thus the javascript isn't working. I did not see any way to mark a component as unmounted. I guess I can manually call the init function. However this doesnt seem like the correct solution, especially if I load a component that consists of other components with javascript I also have to call their init functions. Does someone know a better solution to this problem? Thanks

Comments