Created
December 9, 2018 12:09
-
-
Save byeblogs/e3adbcfa545b639afae8e35bcf50a9e3 to your computer and use it in GitHub Desktop.
Example how to using external libraries in react js..
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
Try following steps: | |
including the external js file link in your /public/index.html | |
use the external library with prefix window. | |
for example, JQuery. | |
put following line in your /public/index.html | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
use it in your project: | |
window.$("#btn1").click(function(){ | |
alert("Text: " + $("#test").text()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment