You can include the tag in the /public/index.html, and then use the script as you use it in normal JS code, following example for if you want to use jQuery:
Sometimes we need to work with external js libraries in such cases we need to insert script tags into components, but in react we use jsx, so we can’t add script tags directly just like how we add in HTML.
In this example, we will see how to load an external script file into a head, body elements, or component.
componentDidMount() {
const script = document.createElement("script");
script.async = true;
script.src = "https://some-scripturl.js";
script.onload = () => this.scriptLoaded();
//For head
document.head.appendChild(script);
// For body
document.body.appendChild(script);
// For component
this.div.appendChild(script);
}
you might check the available functions if you console.log(window) in App.js (or, wherever you want). Once you check the exact function, then you can use it like
window.A.sort();
I think this could be the simplest way. Just remember that you have to write 'window.' on the left side of your function.