File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,10 @@ import * as React from 'react';
22import { IEnvironment } from 'relay-runtime' ;
33import { ReactRelayContext } from './ReactRelayContext' ; // eslint-disable-line @typescript-eslint/no-unused-vars
44
5- export function RelayEnvironmentProvider ( props : { children : React . ReactNode ; environment : IEnvironment } ) : JSX . Element {
5+ export function RelayEnvironmentProvider ( props : {
6+ children : React . ReactNode ;
7+ environment : IEnvironment ;
8+ } ) : React . ReactElement {
69 const context = React . useMemo ( ( ) => ( { environment : props . environment } ) , [ props . environment ] ) ;
710 return < ReactRelayContext . Provider value = { context } > { props . children } </ ReactRelayContext . Provider > ;
811}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ const useInternalQuery = <TOperationType extends OperationType = OperationType>(
1818) : RenderProps < TOperationType > => {
1919 const environment = useRelayEnvironment ( ) ;
2020 const forceUpdate = useForceUpdate ( ) ;
21- const ref = useRef < Reference < TOperationType > > ( ) ;
21+ const ref = useRef < Reference < TOperationType > > ( undefined ) ;
2222 const maybeHiddenOrFastRefresh = useRef ( false ) ;
2323 if ( ref . current === null || ref . current === undefined || maybeHiddenOrFastRefresh . current == true ) {
2424 ref . current = {
You can’t perform that action at this time.
0 commit comments