-
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
How to detect if the script is already loaded? #6
Comments
...solves that problem. |
means i don't have to care about it, as of
onLoad() will also be called in my second instantiation after the script was successfully loaded, right? |
If the props are changed (typeOf [prop] !== 'function'), It will call |
thx @andresin87 any plan for next release in npm? |
Hi @daveyx and @andresin87, we'll make a release as soon as that PR is merged. |
@daveyx So to detect if the script was loaded before, the best would be to track inside your app state if onLoad has been called. Or you can do: const isLoaded = Script.loadedScripts[url] |
Hi,
i use react-load-script to load a script in a component.
If this component is instantiated a second time, i wanna detect if the script was loaded before.
Does react-load-script support this functionality?
The text was updated successfully, but these errors were encountered: