Promise based package that is helping attaching actual google api script in browser
npm i gapi-browser
import { getGapi } from 'gapi-browser';
getGapi.then(gapi => {
console.log(gapi, gapi.load);
});
Google script is added directly to HEAD or BODY tag
Promise is called ass soon as possible