How react references external links within a component

it is feasible to introduce some api, of Amap into the project written by Amap and directly put it in html, but only if you want to reference him in the used component, is there any way to import it outside the chain

<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.8&key=XXX"></script>

Mar.28,2021

const script = document.createElement("script");
script.src = "https://webapi.amap.com/maps?v=1.4.8&key=XXX";
const s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(script, s);

Amap react component

Menu