Skip to content

Instantly share code, notes, and snippets.

@byeblogs
Created December 9, 2018 12:09
Show Gist options
  • Save byeblogs/e3adbcfa545b639afae8e35bcf50a9e3 to your computer and use it in GitHub Desktop.
Save byeblogs/e3adbcfa545b639afae8e35bcf50a9e3 to your computer and use it in GitHub Desktop.
Example how to using external libraries in react js..
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