I consider using a more strict type for my connected React-Redux component.
const ConnectedSelectionFilter = connect(mapsStateToProps, mapDispatchToProps)(SelectionFilter)
The generic type ConnectedComponentClass from React-Redux requires 2 type arguments
ConnectedComponentClass<C, P> = ComponentClass<JSX.LibraryManagedAttributes<C, P>, any> & {
WrappedComponent: C;
}
C obviously refers to the wrapped component, but I'm not sure what does P refer to. I tried ComponentProps (though it can be extracted from the component type) and ownProps but it doesn't work.
How should I use this type generic? An example would be helpful.