Closed stevenjmarsh closed 7 years ago
painful, but figured it out. part of the issue was, verbose error message from flowtype, listing many different solutions to the error because connect()
is polymorphic.
after reading the error message more carefully, noticed the mapToProps functions simply needed to have return annotations. without them, null / void was inferred, causing the type error. Once I annotated the return type, the errors cleared.
(flowtype/require-return-type) warning
In FilterContainer, there is the straight forward use of mapStateToProps and connect().
To properly define its return type, the locally defined mapStateToProps function seems like it could use the MapStateToProps type in the react-redux libdef, but I am not sure of the syntax (or more specifically, not sure if that declaration is supposed to be used / exported).