content: import React from 'react';
  
  const FixedNumber = React.createClass({
      propTypes: {
          id: React.PropTypes.string.isRequired,
          label: React.PropTypes.string.isRequired,
          precision: React.PropTypes.number,
          num: React.PropTypes.number,
      },
  
      getDefaultProps: function() {
          return {
              precision: 0
          };
      },
  
      shouldComponentUpdate: function(nextProps, nextState) {
          return this.normalizeFixedNumber(this.num) !== this.normalizeFixedNumber(nextProps.num);
      },
  
      normalizeFixedNumber: function(num) {
          if (null === num || 'undefined' === typeof num) {
              return '-';
          }
  
          return num.toFixed(this.props.precision);
      },
  
      render: function() {
          const num = this.normalizeFixedNumber(this.props.num);
  
          return (
              <div id={this.props.id}>
                  <span className="label">
                      {this.props.label}
                  </span>
                  <span className="value">
                      {num}
                  </span>
              </div>
          );
      }
  });
  
  export default FixedNumber;
  