var Header = React.createClass({ getInitialState: function() { return { title: "LBRY" }; }, componentWillMount: function() { new MutationObserver(function(mutations) { this.setState({ title: mutations[0].target.innerHTML }); }.bind(this)).observe( document.querySelector('title'), { subtree: true, characterData: true, childList: true } ); }, render: function() { return ( ); } });