1
は、次の関数を考えてみましょう:React Redux接続コンポーネントのフローリターンタイプは何ですか?
import type { ConnectedComponent } from "react-redux";
function createContainer(ComponentToConnect): ConnectedComponent<*, *, *, *> {
// ... define mapStateToProps, mapDispatchToProps
return connect(mapStateToProps, mapDispatchToProps)(ComponentToConnect)
}
これは私に次のフローエラーを与える:
class type: type application of polymorphic type: class type: ConnectedComponent This type is incompatible with the expected return type of ConnectedComponent
このようなReduxの連結成分を返す関数に指定する正しい戻り値の型は何ですか?