import { useState, useEffect } from "react"; /** * Status of script tag element returned from useScript */ export enum ScriptStatus { IDLE = "idle", LOADING = "loading", READY = "ready", ERROR = "error", } /** * Where should the script tag be added to? * Defaults to body */ export enum AddScriptTo { BODY = "body", // default HEAD = "head", } /** * Adds a script tag to the DOM and informs when done. * * @param src value of src in