How can I handle an event to open a window in react js? How can I handle an event to open a window in react js? reactjs reactjs

How can I handle an event to open a window in react js?


You are on the right way!

Is it something you need? I prepared the example: click here

var Example = React.createClass({    fbShare: function() {        window.open('http://www.facebook.com/sharer.php?s=100&p[title]=Fb Share&p[summary]=Facebook share popup&p[url]=javascript:fbShare("http://jsfiddle.net/stichoza/EYxTJ/")&p[images][0]="http://goo.gl/dS52U"', 'sharer', 'toolbar=0,status=0,width=548,height=325');    },    render: function() {        return (<div>            <img src="http://pasadenainstitute.com/fb-shareTransp122x42.png" onClick={this.fbShare} />        </div>);    }});ReactDOM.render(    <Example />,    document.getElementById('container'));