You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you open the console, you will see when each component is triggered an update.
What is the expected behavior?
Only connected components update.
Which versions of react and react-localize-redux are you using?
Using
"react": "16.4.1",
"react-localize-redux": "3.2.3", (working with 3.2.2)
"react-redux": "5.0.7",
"redux": "4.0.0" (same with 3.7.2)
I blocked react-localize-redux to 3.2.2 until this can be figured out.
The text was updated successfully, but these errors were encountered:
Ethorsen
changed the title
Whole app is being updated each time a redux state is changed
Whole app is being updated each time a redux state is changed, bug with 3.2.3
Jul 18, 2018
@Ethorsen@kenhuang thanks again for catching this and providing those great examples. I've just published a fix that should take care of the issue. @Ethorsen when updating your original JS fiddle with 3.2.4 it looks good now, but if you could just confirm on your end that would be great.
For those interested the culprit was from a change here that was made to the getOptions selector. A new copy of the state was being made each time, which would always invalidate the selectors hence resulting in a re-render.
Uh oh!
There was an error while loading. Please reload this page.
Do you want to request a feature or report a bug?
Bug since v3.2.3 when using with redux
What is the current behavior?
The whole app is re-rendering whenever a redux state changes. That behavior is not present in 3.2.2
JSFiddle with 3.2.3 illustrating the problem.
https://jsfiddle.net/g3sb14n9/
JSFiddle with 3.2.2 and exact same code, without the problem
https://jsfiddle.net/erah1nqv/
If you open the console, you will see when each component is triggered an update.
What is the expected behavior?
Only connected components update.
Which versions of
react
andreact-localize-redux
are you using?Using
"react": "16.4.1",
"react-localize-redux": "3.2.3", (working with 3.2.2)
"react-redux": "5.0.7",
"redux": "4.0.0" (same with 3.7.2)
I blocked react-localize-redux to 3.2.2 until this can be figured out.
The text was updated successfully, but these errors were encountered: