@@ -69,14 +69,14 @@ type ContainerState = {
69
69
*/
70
70
function createContainerWithFragments <
71
71
Props : { ...} ,
72
- TComponent : React . ComponentType < Props > ,
72
+ TComponent : component ( ... Props ) ,
73
73
> (
74
74
Component: TComponent,
75
75
fragments: FragmentMap,
76
76
taggedNode: GraphQLTaggedNode,
77
- ) : React . ComponentType <
78
- $RelayProps < React . ElementConfig < TComponent > , RelayRefetchProp > ,
79
- > {
77
+ ): component(
78
+ ... $RelayProps< React . ElementConfig < TComponent > , RelayRefetchProp>
79
+ ) {
80
80
const containerName = getContainerName ( Component ) ;
81
81
82
82
return class extends React . Component < ContainerProps , ContainerState > {
@@ -486,13 +486,13 @@ function getRelayProp(
486
486
* `fragmentSpec` is memoized once per environment, rather than once per
487
487
* instance of the container constructed/rendered.
488
488
*/
489
- function createContainer < Props : { ...} , TComponent : React . ComponentType < Props > >(
489
+ function createContainer< Props : { ...} , TComponent : component ( ... Props ) > (
490
490
Component : TComponent ,
491
491
fragmentSpec : GeneratedNodeMap ,
492
492
taggedNode : GraphQLTaggedNode ,
493
- ) : React . ComponentType <
494
- $RelayProps < React . ElementConfig < TComponent > , RelayRefetchProp > ,
495
- > {
493
+ ) : component (
494
+ ... $RelayProps < React . ElementConfig < TComponent > , RelayRefetchProp >
495
+ ) {
496
496
// $FlowFixMe[incompatible-return]
497
497
return buildReactRelayContainer (
498
498
Component ,
0 commit comments