React Script de carga dinámica

function loadScript(src: string): void {
  const tag = document.createElement('script')
  tag.async = false
  tag.src = src
  tag.type = "module" // if it's a module
  document.body.appendChild(tag)
}
Long Lobster