Hoe laad je een bibliotheek in een themacomponent

The result of your loadscript is a promise so you need to put your code relying on it in a .then block as per my example code