Fixed: Improve performance of search input selector

pull/6/head
Qstick 6 years ago
parent a3e955443d
commit 1955cd9f73

@ -2,6 +2,7 @@ import { connect } from 'react-redux';
import { push } from 'connected-react-router'; import { push } from 'connected-react-router';
import { createSelector } from 'reselect'; import { createSelector } from 'reselect';
import createAllArtistSelector from 'Store/Selectors/createAllArtistSelector'; import createAllArtistSelector from 'Store/Selectors/createAllArtistSelector';
import createDeepEqualSelector from 'Store/Selectors/createDeepEqualSelector';
import createTagsSelector from 'Store/Selectors/createTagsSelector'; import createTagsSelector from 'Store/Selectors/createTagsSelector';
import ArtistSearchInput from './ArtistSearchInput'; import ArtistSearchInput from './ArtistSearchInput';
@ -16,7 +17,6 @@ function createCleanArtistSelector() {
sortName, sortName,
images, images,
foreignArtistId, foreignArtistId,
// alternateTitles,
tags = [] tags = []
} = artist; } = artist;
@ -35,7 +35,7 @@ function createCleanArtistSelector() {
} }
function createMapStateToProps() { function createMapStateToProps() {
return createSelector( return createDeepEqualSelector(
createCleanArtistSelector(), createCleanArtistSelector(),
(artists) => { (artists) => {
return { return {

Loading…
Cancel
Save