on-internet
← Community

Using CDN in React

Stack Overflow ·

I've installed React via NPM and I'm having difficulty using CDN. I included the CDN scripts in the ./public/index.html file but when I use it in any component, it doesn't recognize the third-party package that I'm trying to use. <script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/redux/4.0.5/redux.min.js"></script> Tried to use Axios but it doesn't work: axios.post("https://burger-builder-c5a0d.firebaseio.com/orders.json", order) .then(response=>{ alert("You ordered successfully!"); //shows an alert indic

Comments

Sign in or sign up to comment and upvote.

No comments yet.