Script not be removed when the Parent Component unmounted.
qhxin opened this issue · comments
I use react-load-script in my SPA , and i only need the scripts be loaded when a Wrapper Component mounted, when i route to an another Wrapper Component , the old scripts should be removed and new scripts will loaded, but it did not work like this, the old scripts conflicts to the new scripts, so it works bad.
Hello @qhxin,
I am afraid there is not much that can be done from our side - this library works by adding a script
tag to the DOM. Once such a script is loaded, it stays in the browser memory even after removing the script
tag from the DOM.
If there are some conflicts happening, they will have to be resolved on your side.