old_contents: /**
   * React Starter Kit (https://www.reactstarterkit.com/)
   *
   * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.txt file in the root directory of this source tree.
   */
  
  import React, { Component, PropTypes } from 'react';
  import withStyles from 'isomorphic-style-loader/lib/withStyles';
  import s from './Content.css';
  
  class Content extends Component {
  
    static contextTypes = {
      setTitle: PropTypes.func.isRequired,
    };
  
    static propTypes = {
      path: PropTypes.string.isRequired,
      content: PropTypes.string.isRequired,
      title: PropTypes.string,
    };
  
    componentWillMount() {
      this.context.setTitle(this.props.title);
    }
  
    render() {
      return (
        <div className={s.root}>
          <div className={s.container}>
            {this.props.path === '/' ? null : <h1>{this.props.title}</h1>}
            <div dangerouslySetInnerHTML={{ __html: this.props.content || '' }} />
          </div>
        </div>
      );
    }
  
  }
  
  export default withStyles(s)(Content);
  
new_contents: /**
   * React Starter Kit (https://www.reactstarterkit.com/)
   *
   * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.txt file in the root directory of this source tree.
   */
  
  import React, { Component, PropTypes } from 'react';
  import withStyles from 'isomorphic-style-loader/lib/withStyles';
  import s from './Content.css';
  
  class Content extends Component {
  
    static contextTypes = {
      setTitle: PropTypes.func.isRequired,
    };
  
    static propTypes = {
      path: PropTypes.string.isRequired,
      content: PropTypes.string.isRequired,
      title: PropTypes.string,
    };
  
    componentWillMount() {
      this.context.setTitle(this.props.title);
    }
  
    componentWillReceiveProps(nextProps) {
      this.context.setTitle(nextProps.title);
    }
  
    render() {
      return (
        <div className={s.root}>
          <div className={s.container}>
            {this.props.path === '/' ? null : <h1>{this.props.title}</h1>}
            <div dangerouslySetInnerHTML={{ __html: this.props.content || '' }} />
          </div>
        </div>
      );
    }
  
  }
  
  export default withStyles(s)(Content);
  
subject: Fix not updating title when navigating between two content pages (#758)