decentraland / decentraland/builder

Fix selector with parameters not memoizing correctly

Open
#1,930 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
156
Forks
91
Avg merge
2d 7h
Merged PRs (30d)
31

Description

## 🎉 Description

As we're using `reselect` `4.0.0`, we can't define the selectors with parameters as we did with `getStatusForItemIds`. That feature was introduced in `4.1.0`, so that function is not memoizing correctly, meaning it's computing the output on every single re-render.

* [X] 🐛 This is a bug report.
* [ ] 📈 This is a feature request.

## 📝 Details

Analyse if it's possible to update `reselect` (I tried it but it throw a lot of errors, looks like they introduced breaking changes) OR create a selector using lodash's memoize function as a work-around (as it was done [here](https://github.com/decentraland/builder/pull/1921/files#diff-d359e1b92919193895afef875d66f8f3ea5f5caccec8d9eacf71c96f90c6e89dR79))

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.