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
It seems that passing a store property into a connected component overrides the store from the context in typical cases (i.e. not specifying a storeKey, using standard connect, etc).
This seems to be expected as you mention here https://github.com/reactjs/react-redux/blob/master/docs/api.md#L8 but it has been a surprise as the error messages resulting from trying to use the property for something else, unawares, have been a bit hard to decipher
Hi everyone.
It seems that passing a
store
property into a connected component overrides the store from the context in typical cases (i.e. not specifying astoreKey
, using standardconnect
, etc).This seems to be expected as you mention here https://github.com/reactjs/react-redux/blob/master/docs/api.md#L8 but it has been a surprise as the error messages resulting from trying to use the property for something else, unawares, have been a bit hard to decipher
My question is - do you think it would be a good idea to check here
https://github.com/reactjs/react-redux/blob/master/src/components/connectAdvanced.js#L122
somehow if the value of the property is an actual redux store, and throw a useful error if it's not?
Or perhaps using a different default
storeKey
like__store
?Cheers
The text was updated successfully, but these errors were encountered: