Use reselect to memoize denormalization in UI state
Also upgrade react-redux to latest version. This is a performance update
This commit is contained in:
@ -4,14 +4,10 @@ import {
|
||||
dismissNotification,
|
||||
clearNotifications
|
||||
} from '../../../actions/notifications';
|
||||
import { getNotifications } from '../../../selectors';
|
||||
|
||||
const mapStateToProps = (state, props) => ({
|
||||
notifications: state.get('notifications').map((item, i) => ({
|
||||
message: item.get('message'),
|
||||
title: item.get('title'),
|
||||
key: item.get('key'),
|
||||
dismissAfter: 5000
|
||||
})).toJS()
|
||||
notifications: getNotifications(state)
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
|
Reference in New Issue
Block a user