old_contents: var hljs = require('highlight.js');
  var React = require('react');
  var ReactDOM = require('react-dom');
  
  var Highlight = React.createClass({
    getDefaultProps: function () {
      return {
        innerHTML: false,
        className: null
      };
    },
    componentDidMount: function () {
      this.highlightCode();
    },
    componentDidUpdate: function () {
      this.highlightCode();
    },
    highlightCode: function () {
      var domNode = ReactDOM.findDOMNode(this);
      var nodes = domNode.querySelectorAll('pre code');
      if (nodes.length > 0) {
        for (var i = 0; i < nodes.length; i=i+1) {
          hljs.highlightBlock(nodes[i]);
        }
      }
    },
    render: function () {
      if (this.props.innerHTML) {
        return <div dangerouslySetInnerHTML={{__html: this.props.children}} className={this.props.className || null}></div>;
      } else {
        return <pre><code className={this.props.className}>{this.props.children}</code></pre>;
      }
    }
  });
  
  module.exports = Highlight;
  
new_contents: import React, { Component } from 'react';
  import ReactDOM from 'react-dom';
  import hljs from 'highlight.js';
  
  class Highlight extends Component {
    getDefaultProps() {
      return {
        innerHTML: false,
        className: null,
      };
    }
  
    componentDidMount() {
      this.highlightCode();
    }
  
    componentDidUpdate() {
      this.highlightCode();
    }
  
    highlightCode() {
      const domNode = ReactDOM.findDOMNode(this);
      const nodes = domNode.querySelectorAll('pre code');
  
      if (nodes.length > 0) {
        for (let i = 0; i < nodes.length; i++) {
          hljs.highlightBlock(nodes[i]);
        }
      }
    }
  
    render() {
      const { innerHTML, children, className } = this.props;
  
      if (innerHTML) {
        return (
          <div
            dangerouslySetInnerHTML={{ __html: children }}
            className={className || null}
          ></div>);
      }
  
      return (
        <pre>
          <code className={className}>{children}</code>
        </pre>
      );
    }
  }
  
  export default Highlight;
  
subject: change Highlight to ES6