shouldComponentUpdate to plug time-based rerenders?

This commit is contained in:
James Barnsley
2020-09-20 21:04:40 +12:00
parent 59d73d409d
commit 9a3b9cb1bf
16 changed files with 379 additions and 226 deletions

View File

@ -80,7 +80,6 @@ export default function reducer(core = {}, action) {
(obj, item) => (obj[item.uri] = item, obj),
{},
);
console.timeEnd('TIMER');
return {
...core,
items: {

View File

@ -355,8 +355,8 @@ export function getImages(context, uri) {
export function loveTrack(uri) {
return (dispatch, getState) => {
const track = getState().core.items[uri];
if (getState().core.items[uri] !== undefined) {
var track = getState().core.items[uri];
if (!track.artists) {
dispatch(coreActions.handleException(
'Could not love LastFM track',