Selectors not properly memoized for Library views, renders every second (track position changing)

This commit is contained in:
James Barnsley
2020-09-25 06:54:19 +12:00
parent 6dbcb6ee8e
commit a409ca0f85
13 changed files with 490 additions and 474 deletions

View File

@ -421,7 +421,6 @@ const CoreMiddleware = (function () {
break;
case 'LOAD_ARTIST':
console.log(action);
const fetchArtist = () => {
switch (uriSource(action.uri)) {
case 'spotify':
@ -585,7 +584,7 @@ const CoreMiddleware = (function () {
break;
case 'LOAD_LIBRARY':
store.dispatch(uiActions.startLoading(action.uri));
store.dispatch(uiActions.startLoading(action.uri, action.uri));
const fetchLibrary = () => {
switch (uriSource(action.uri)) {
case 'spotify':
@ -975,7 +974,7 @@ const CoreMiddleware = (function () {
break;
case 'RESTORE_ITEMS_FROM_COLD_STORE':
store.dispatch(uiActions.stopLoading(action.items));
store.dispatch(uiActions.stopLoading(arrayOf('uri', action.items)));
next(action);
break;