Forum Discussion
react
- Anonymous9 years ago
I got this workaround from David Tittsworth...Thanks!
Add a global.js file with contents:
var React = window.React;
var ReactDOM = window.ReactDOM;
and then in pbiviz.json, add a reference to the global.js file in externalJS at the bottom.
This works!
Anonymous
Power BI creates a copy of the window object in order to isolate custom visual's libraries from its own.
D3 works well due to special logic that binds d3 to the global context.
I suppose that we will get rid of isolation to simplify using external libraries.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
I got this workaround from David Tittsworth...Thanks!
Add a global.js file with contents:
var React = window.React;
var ReactDOM = window.ReactDOM;
and then in pbiviz.json, add a reference to the global.js file in externalJS at the bottom.
This works!