Skip to content

Ability to pass in custom memoization function for selectors #724

@alex-okrushko

Description

@alex-okrushko

I'm submitting a...


[x] Feature request

What is the current behavior?

Currently the hardcoded memoization is instance equality check, which doesn't work well with arrays.

e.g. I have an array that changes on certain actions and there are many selectors for this data. Some/most selectors return the same items, but because it's a new array all the selector changes are needlessly triggered.

reselect has createSelectorCreator for that purpose.

Expected behavior:

Minimal reproduction of the problem with instructions:

Version of affected browser(s),operating system(s), npm, node and ngrx:

Other information:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions