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
For example in the following, I would expect newState to equal { id: 1234, name: 'hello' } but it instead returns currentState.
constcurrentState={id: 1234,name: 'hello',unexpected: 4567};constreducer=combineReducers({ id, name });constnewState=reducer(currentState,{});
The additional key is harmless in code, but it is annoying since an error warning may be printed to console repeatedly. This case is pretty easy to run into if the redux tree is persisted and the data shape changes.
The text was updated successfully, but these errors were encountered:
For now, let’s do something different. I propose we keep a cache for properties we warned about in development, and don’t warn about them the second time.
For example in the following, I would expect
newState
to equal{ id: 1234, name: 'hello' }
but it instead returnscurrentState
.The additional key is harmless in code, but it is annoying since an error warning may be printed to console repeatedly. This case is pretty easy to run into if the redux tree is persisted and the data shape changes.
The text was updated successfully, but these errors were encountered: