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:
parent
1f650d327d
commit
ef9d4f4e06
12 changed files with 136 additions and 80 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue