Created
February 22, 2018 12:49
-
-
Save itrelease/cdcfe05cb231baa932c858161137d10e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SomeComponent extends React.Component { | |
... | |
componentDidMount() { | |
const script = document.createElement("script"); | |
script.type = "text/javascript"; | |
script.src = "[path_to_some_library]"; | |
document.getElementsByTagName("head")[0].appendChild(script); | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment