<commit_before>import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import getModel from '../utils/get-model';
import omit from 'lodash/omit';

class Fieldset extends Component {
  getChildContext() {
    return { model: this.props.model };
  }

  render() {
    const { component } = this.props;

    const allowedProps = omit(this.props, Object.keys(Fieldset.propTypes));

    return React.createElement(
      component,
      allowedProps);
  }
}

Fieldset.childContextTypes = {
  model: PropTypes.any,
};

Fieldset.propTypes = {
  model: PropTypes.string.isRequired,
  component: PropTypes.any,
  dispatch: PropTypes.func,
};

Fieldset.defaultProps = {
  component: 'div',
};

function mapStateToProps(state, { model }) {
  const modelString = getModel(model, state);

  return {
    model: modelString,
  };
}

export default connect(mapStateToProps)(Fieldset);
<commit_msg>Fixing missing propTypes in production builds for Fieldset. Fixes #504<commit_after>import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import getModel from '../utils/get-model';
import omit from 'lodash/omit';

const propTypes = {
  model: PropTypes.string.isRequired,
  component: PropTypes.any,
  dispatch: PropTypes.func,
};

class Fieldset extends Component {
  getChildContext() {
    return { model: this.props.model };
  }

  render() {
    const { component } = this.props;

    const allowedProps = omit(this.props, Object.keys(propTypes));

    return React.createElement(
      component,
      allowedProps);
  }
}

Fieldset.childContextTypes = {
  model: PropTypes.any,
};

Fieldset.propTypes = propTypes;

Fieldset.defaultProps = {
  component: 'div',
};

function mapStateToProps(state, { model }) {
  const modelString = getModel(model, state);

  return {
    model: modelString,
  };
}

export default connect(mapStateToProps)(Fieldset);

{'fraction_non_alphanumeric': 0.12473903966597077, 'fraction_numerical': 0.0015657620041753654, 'mean_word_length': 4.005221932114883, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5308137', 'n_tokens_mistral': 594, 'n_tokens_neox': 585, 'n_words': 140}