platform icon indicating copy to clipboard operation
platform copied to clipboard

Add doc for resultMemoize(projectorFn, isEqual) and createSelectorFactory()

Open wiegell opened this issue 4 years ago • 4 comments

Please add this example to the docs: https://www.youtube.com/watch?v=E7GKnjGCXzU&t=641s&ab_channel=NgTalks

Also upvoted by 11 people in this issue: https://github.com/ngrx/platform/issues/724

I would be willing to submit a PR for the docs :heart:

[ ] Yes (Assistance is provided if you need help submitting a pull request) [x] No

wiegell avatar Feb 06 '21 20:02 wiegell

Hi, that talk is indeed 🔥🔥🔥

You can find the docs at the API section, here's a link

timdeschryver avatar Feb 20 '21 16:02 timdeschryver

Hi Tim, thanks for the reply.

IMO createSelectorFactory should somehow be a part of the guide at this page: https://ngrx.io/guide/store/selectors And also - the link you provided could really use some expanding on how the "regular" memoization works (comparing arguments and results by reference, and not actual content), and then further expanded with the example included in the talk (with deep equal).

A lot of people actively seek to avoid mutability in their code, which in turn makes the regular memoization unusable resulting in the change detection and other logic firing unnecessarily.

I suggest reopening the issue.

wiegell avatar Feb 21 '21 20:02 wiegell

Feel free to create a Pull Request to add an example @wiegell

timdeschryver avatar Feb 22 '21 10:02 timdeschryver

Ty, i'm busy atm. though - might get back to it some time.

wiegell avatar Feb 24 '21 21:02 wiegell