Skip to content

useSelector code is now checking for current state changes which breaks current applications #1813

Closed
@suncodefactory

Description

@suncodefactory

What version of React, ReactDOM/React Native, Redux, and React Redux are you using?

  • React:
  • ReactDOM/React Native:
  • Redux:
  • React Redux:

What is the current behavior?

in version 7.2.5 a new piece of code was added

image

This is just a reference check and it is causing a lot of useSelectors to not be called. Specially if you use the second parameter which is a callback to compare for equality.

Not everyone relies on the default equality comparer and not everyone replaces the entire state object if just one property changes for example. That would be overkill with complex stores and complex apps.

What is the expected behavior?

The expected behavior is that when the useSelector takes a second parameter with an equality comparer function to let the useSelector decide if the state has changed.

Which browser and OS are affected by this issue?

All browsers all OS

Did this work in previous versions of React Redux?

  • Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions