platform
platform copied to clipboard
Add doc for resultMemoize(projectorFn, isEqual) and createSelectorFactory()
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
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.
Feel free to create a Pull Request to add an example @wiegell
Ty, i'm busy atm. though - might get back to it some time.