<commit_before>var React = require('react');

var MainAppStore = require('../stores/MainAppStore');
var Home = require('./Home.jsx');
var About = require('./About.jsx');
var Nav = require('./Nav.jsx');
var FluxibleMixin = require('fluxible').Mixin;

var mainApp = React.createClass({

    /**
     * after mixin, mainApp can have this.getStore()
     */
    mixins: [FluxibleMixin],
    static: {
        storeListeners: [MainAppStore]
    },

    getInitialState: function() {
        return this.getStore(MainAppStore).getState();
    },

    onChange: function(){
        var state = this.getStore(MainAppStore).getState();
        this.setState(state);
    },<commit_msg>[fluxible] fix client side nav not work<commit_after>var React = require('react');

var MainAppStore = require('../stores/MainAppStore');
var Home = require('./Home.jsx');
var About = require('./About.jsx');
var Nav = require('./Nav.jsx');
var FluxibleMixin = require('fluxible').Mixin;

var mainApp = React.createClass({

    /**
     * after mixin, mainApp can have this.getStore()
     */
    mixins: [FluxibleMixin],

    // when MainAppStore call "this.emitChange()",
    // "onStoreChange()" of mainApp will be called
    statics: {
        storeListeners: {
            'onStoreChange': [MainAppStore]
        }
    },
    getInitialState: function() {
        return this.getStore(MainAppStore).getState();
    },

    // handler for handling the change of MainAppStore
    onStoreChange: function(){
        var state = this.getStore(MainAppStore).getState();
        this.setState(state);
    },
{'fraction_non_alphanumeric': 0.15253164556962026, 'fraction_numerical': 0.0, 'mean_word_length': 3.0852713178294575, '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': '4658013', 'n_tokens_mistral': 485, 'n_tokens_neox': 478, 'n_words': 108}