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
The following console warning appears when calling firestoreConnect() with react-redux's connect(..., mapDispatchToProps), but everything still works as expected.
Warning: Failed prop type: The prop `dispatch` is marked as required in `FirestoreConnect(RenderContainer)`, but its value is `undefined`.
in FirestoreConnect(RenderContainer) (created by Connect(FirestoreConnect(RenderContainer)))
in Connect(FirestoreConnect(RenderContainer)) (created by LoadableComponent)
Seems like a rogue propType issue.
The code is here:
import{RenderContainer}from'./RenderContainer';import{connect}from'react-redux';import{compose}from'recompose';import{RootState}from'@types';import{firestoreConnect}from'react-redux-firebase';import{Dispatch,bindActionCreators}from'redux';interfaceOwnProps{}interfaceDispatchProps{}typeProps=OwnProps&DispatchProps;constmapDispatchToProps=(dispatch: Dispatch<RootState>): DispatchProps=>bindActionCreators({// action creators go here},dispatch);exportdefaultcompose<Props,OwnProps>(connect(null,mapDispatchToProps),firestoreConnect(['items/{itemId}']))(RenderContainer);
Interestingly, there's no warning if and only if firestoreConnect is called before connect AND mapDispatchToProps is null. But the warning appears if firestoreConnect is called after connect with and without mapDispatchToProps.
I'm on the 3.0.0-alpha.5 branch using Chrome 71.0.3578.98 (latest).
The text was updated successfully, but these errors were encountered:
The following console warning appears when calling
firestoreConnect()
withreact-redux
'sconnect(..., mapDispatchToProps)
, but everything still works as expected.Seems like a rogue propType issue.
The code is here:
Interestingly, there's no warning if and only if
firestoreConnect
is called beforeconnect
ANDmapDispatchToProps
isnull
. But the warning appears iffirestoreConnect
is called afterconnect
with and withoutmapDispatchToProps
.I'm on the
3.0.0-alpha.5
branch using Chrome 71.0.3578.98 (latest).The text was updated successfully, but these errors were encountered: