Skip to content

Commit 81932ca

Browse files
committed
connect: Add an error-help comment.
I.e., a comment placed so Flow will show it in error messages. :)
1 parent f8c9810 commit 81932ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/react-redux.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ export type OwnProps<-C, -SP> = $Diff<
6868
*/
6969
// prettier-ignore
7070
export function connect<SP, P, C: ComponentType<P>>(
71-
mapStateToProps?: (GlobalState, OwnProps<C, SP>) => SP,
71+
mapStateToProps?: (GlobalState, OwnProps<C,
72+
// Error "property `foo` is missing"? Add to inner component's props.
73+
SP>) => SP,
7274
): C => ComponentType<OwnProps<C, SP>> {
7375
return connectInner(mapStateToProps);
7476
}

0 commit comments

Comments
 (0)