<commit_before>import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';

import * as actions from './actions';

export default function Enhance(optionalStore, options) {
    return (BaseComponent) => {
        class EnhancedComponent extends Component {
            static contextTypes = {
                store: PropTypes.object,
            };

            static propTypes = {
                register: PropTypes.func.isRequired,
            };

            componentWillMount() {
                const { register } = this.props;
                const { store } = this.context;

                register({ ...options, store });
            }

            render() {
                const ConnectedComponent = connect(
                    options.mapStateToProps,
                    options.actions
                )(BaseComponent);

                return <ConnectedComponent {...this.props} />;
            }
        }

        return connect(
            null,
            { register: actions.register }
        )(EnhancedComponent);
    };
}
<commit_msg>passing through redux-react's mergeProps and options<commit_after>import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';

import * as actions from './actions';

export default function Enhance(optionalStore, options) {
    return (BaseComponent) => {
        class EnhancedComponent extends Component {
            static contextTypes = {
                store: PropTypes.object,
            };

            static propTypes = {
                register: PropTypes.func.isRequired,
            };

            componentWillMount() {
                const { register } = this.props;
                const { store } = this.context;

                register({ ...options, store });
            }

            render() {
                const ConnectedComponent = connect(
                    options.mapStateToProps,
                    options.actions,
                    options.mergeProps,
                    options.options
                )(BaseComponent);

                return <ConnectedComponent {...this.props} />;
            }
        }

        return connect(
            null,
            { register: actions.register }
        )(EnhancedComponent);
    };
}

{'fraction_non_alphanumeric': 0.09532062391681109, 'fraction_numerical': 0.0, 'mean_word_length': 1.4382259767687433, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '1410196', 'n_tokens_mistral': 550, 'n_tokens_neox': 512, 'n_words': 127}