title: Bing Map component in React
body: <p>I want create component to show bing map in React.js with TypeScript.<br/>
  I know that there is very component in github for this purpose. but I want create this component from scratch for myself.<br/>
  I created class in react and in <code>componentWillMount</code> function injected script tag to <code>head</code> of my html:</p>
  
  <pre><code>    componentWillMount() {
          const script = document.createElement("script");
          var scriptURL = "&lt;script type='text/javascript' src='https://www.bing.com/api/maps/mapcontrol?key=" + this.props.apiKey + "' &gt;&lt;/script&gt;";
          const scriptText = document.createTextNode(scriptURL);
  
          script.appendChild(scriptText);
          document.head.appendChild(script);
      }
  </code></pre>
  
  <p>when I want create map followed by <a href="https://docs.microsoft.com/en-us/bingmaps/v8-web-control/creating-and-hosting-map-controls/creating-a-basic-map-control" rel="nofollow noreferrer">this document</a>
   in <code>componentDidMount</code> function like this:</p>
  
  <pre><code>componentDidMount() {
          var map = new Microsoft.Maps.Map(this.mapElement);
      }
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>Cannot find name 'Microsoft'.</p>
  </blockquote>
  
  <p>how to I should import 'Microsoft' module to my component?</p>