title: embed twitter timeline in react app
body: <p>I am trying to add the English premier league twitter timeline to my react app. 
  Twitter gives me the code snippet for HMTL which works in a regular HTML page.  </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
  &lt;title&gt;PREMIER LEAGUE&lt;/title&gt;
  &lt;link rel="stylesheet" href=""&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div&gt;
  &lt;a class="twitter-timeline"  href="https://twitter.com/search?q=%40premierleague" data-widget-id="820173369198968833"&gt;Tweets about @premierleague&lt;/a&gt;
          &lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");&lt;/script&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I have tried to convert this into my react app but it does not work or throw any error. Here is code i used in react.</p>
  
  <pre><code>import React, { Component } from 'react';
  import logo from './logo.svg';
  import './App.css';
  
  
  
  
  
  class App extends Component {
  
  render() {
  return (
    &lt;div className="App"&gt;
      &lt;div className="App-header"&gt;
        &lt;img src={logo} className="App-logo" alt="logo" /&gt;
        &lt;h2&gt;WELCOME TO THE PREMIER LEAGUE BLOG&lt;/h2&gt;
      &lt;/div&gt;
      &lt;div&gt;
      &lt;meta charSet="utf-8" /&gt;
      &lt;meta httpEquiv="X-UA-Compatible" content="IE=edge" /&gt;
      &lt;title&gt;PREMIER LEAGUE&lt;/title&gt;
      &lt;link rel="stylesheet" href /&gt;
      &lt;div&gt;
        &lt;a className="twitter-timeline" href="https://twitter.com/search?q=%40premierleague" data-widget-id={820173369198968833}&gt;Tweets about @premierleague&lt;/a&gt;
        {!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");}
      &lt;/div&gt;
    &lt;/div&gt;
  
        &lt;/div&gt;
  );
  }
  }
  
  export default App;
  </code></pre>
  
  <p>Thanks in advance for your help.</p>