Instead of using setState
of react, state management can be handled with mapDispatchToProps
in redux.
import React from 'react';
import { connect, Provider } from 'react-redux'
import { createStore } from 'redux'
// Redux:
const ADD = 'ADD';
const addMessage = (message) => { …