-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Script not load again after react-router changes #14
Comments
Hi. You mean the script doesn't load again, or it doesn't work at all - like it has never been loaded ? It shouldn't load the script again when navigation through SPA (but onLoad handler is called again), but the script should work of course. |
I'm having the same issue, but I believe this is just the caveat of using Once scripts are loaded on a page, I believe they can't be unloaded nor reloaded. Since an SPA stays on the same page, the script in question has to take this into account and work accordingly. But if you're using a third-party script where you have no source control (like I am) it might not be possible to patch that script so that it works as you'd expect with an SPA |
I'm with bitstrider. The script is never unloaded if a component is unmounted. This causes certain fields to remain even if another user logs into the application. |
same problem here |
The work around I found was moving import |
but my question is this, since the script tag is loaded on index.html file inside the public folder, and the index.html loads only once, why is it necessary to load the script on a component?? |
I have a SPA and when I go from the page who use the react-load-script component to other page and then go back to the first page the script dosn't works.
The text was updated successfully, but these errors were encountered: