Skip to content Skip to sidebar Skip to footer

How Do You Handle A Script.src Url Callback In A React Component?

I can't seem to figure out how to fire a function based off google's script GET request. export class Map extends Component { constructor(props) { super(props);

Solution 1:

The callback from the google api is looking for window.scriptInitialized. You have the scriptInitialized tied to the component, not the window. Here is a link on how to add the function on the window in React


Post a Comment for "How Do You Handle A Script.src Url Callback In A React Component?"