You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
379 B
17 lines
379 B
import { connect } from 'react-redux';
|
|
import { createSelector } from 'reselect';
|
|
import Messages from './Messages';
|
|
|
|
function createMapStateToProps() {
|
|
return createSelector(
|
|
(state) => state.app.messages.items,
|
|
(messages) => {
|
|
return {
|
|
messages: messages.slice().reverse()
|
|
};
|
|
}
|
|
);
|
|
}
|
|
|
|
export default connect(createMapStateToProps)(Messages);
|