I'd like to load the API on-demand in a ReactJS component, so I'm using script.js as such:
const containerDiv = document.getElementById("tableau-container");
const url = "http://MYURL.online.tableau.com/views/BOOKNAME/DASHBOARD";
const v = new window.tableau.Viz(containerDiv, url);
It does not seem like the API is actually loaded when the callback function executes. I get this error: `Uncaught TypeError: window.tableau.Viz is not a constructor`
Has anyone managed to successfully do something like this?
Retrieving data ...