JS-ReactRedux : Connect Redux to the Messages App
// Redux: const ADD = 'ADD' ; const addMessage = (message) => { return { type : ADD, message: message } }; const messageReducer = (state = [], action) => { switch (action.type) { case ADD: return [ ...state, action.message ]; default : return state; } }; const store = Redux.createStore(messageReducer); // React: class Presentational extends React.Component { constructor (props) { super (props); this .state = { input: '' , messages: [] } this .handleChange = this .handleChange.bind( this ); this .submitMessage = this .submitMessage.bind( this ); } handleChange(event) { this .setState({ input: event.target.value }); } submitMessage() { const currentMessage = this .state.input; this .setState({ input: '' , messages: this .state.message...