<commit_before>var StoreMixin = {
    getInitialState: function() {
        if (!this.getStoreState) {
            var err = new Error('Require `getStoreState()` when using `StoreMixin`');
            console.warn(err.stack);
        }

        return this.getStoreState();
    },
    componentDidMount: function() {
        this._isMounted = true;
    },
    onStoreChange: function() {
        if (this._isMounted) {
            this.setState(this.getStoreState());
        }
    },
    componentWillUnmount: function() {
        this._isMounted = false;
    },
};

module.exports = StoreMixin;<commit_msg>Restore invoking onStoreChange() in componentDidMount()<commit_after>var StoreMixin = {
    getInitialState: function() {
        if (!this.getStoreState) {
            var err = new Error('Require `getStoreState()` when using `StoreMixin`');
            console.warn(err.stack);
        }

        return this.getStoreState();
    },
    componentDidMount: function() {
        this._isMounted = true;

        // Make sure state is up-to-date
        this.onStoreChange();
    },
    onStoreChange: function() {
        if (this._isMounted) {
            this.setState(this.getStoreState());
        }
    },
    componentWillUnmount: function() {
        this._isMounted = false;
    },
};

module.exports = StoreMixin;
{'fraction_non_alphanumeric': 0.12781954887218044, 'fraction_numerical': 0.0, 'mean_word_length': 2.2783251231527095, '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': '2521091', 'n_tokens_mistral': 390, 'n_tokens_neox': 384, 'n_words': 73}