score:1

Accepted answer
// ./components/Menu.react.js
var React = require('react');
var CommonActionCreators = require('../actions/CommonActionCreators');

var Menu = React.createClass({
    _handleClickMenu: function() {
        CommonActionCreators.setMenuClieckOn();
    }
});

score:1

var Info = React.createClass({
    componentDidMount: function() {
        CommonStore.addChangeListener(this._handleChangeStore);
    },
    componentWillUnmount: function() {
        CommonStore.remChangeListener(this._handleChangeStore);
    },
    getInitialState() {
        return {
            count: CommonStore.getState()
        };
    },
    _handleChangeStore: function() {
        this.setState(count: CommonStore.getState();
    },
    render: function() {
        return (
            <div>
                info: {this.state.count}
            </div>
        );
    },
});

Related Query

More Query from same tag