So i have a simple react component rendering text and images except for 1 line rendering a twitter widget. It works fine but when i route to a different view then come back that widget will not show unless i refresh the page. Sorry i just started using react.js thanks
!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");
class JkpartyView extends React.Component{
render() {
return (<div>
<NavHeader />
<LinksView />
<div id="jkparty-container">
<div id="jkparty-banner"></div>
<div id="jkparty-info">
<h3>Welcome to JKParty</h3>
<p>Watch the crew act crazy</p>
</div>
<div id="jkparty-soundcloud">
</div>
</div>
<div id="jkparty-twitter">
<!--Widget-->
<a className="twitter-timeline" href="https://twitter.com/JKFilms" data-widget-id="660182203867901952">Tweets by @JKFilms</a>
</div>
</div>)
}
}
React.render(<JkpartyView />, document.body)