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
' returned a different result when called with the same parameters. This can lead to unnecessary rerenders.'+
102
-
'\nSelectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization',
103
-
{
104
-
state,
105
-
selected,
106
-
selected2: toCompare,
107
-
}
108
-
)
91
+
if(process.env.NODE_ENV!=='production'){
92
+
constfinalStabilityCheck=
93
+
// are we safe to use ?? here?
94
+
typeofstabilityCheck==='undefined'
95
+
? globalStabilityCheck
96
+
: stabilityCheck
97
+
if(
98
+
finalStabilityCheck==='always'||
99
+
(finalStabilityCheck==='once'&&firstRun.current)
100
+
){
101
+
consttoCompare=selector(state)
102
+
if(!equalityFn(selected,toCompare)){
103
+
console.warn(
104
+
'Selector '+
105
+
(selector.name||'unknown')+
106
+
' returned a different result when called with the same parameters. This can lead to unnecessary rerenders.'+
107
+
'\nSelectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization',
0 commit comments