Skip to content

Commit c140f47

Browse files
committed
Merge branch 'master' into react-v19
2 parents 0a7aaa5 + 3153466 commit c140f47

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/RelayEnvironmentProvider.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import * as React from 'react';
22
import { IEnvironment } from 'relay-runtime';
33
import { 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
}

src/useQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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 = {

0 commit comments

Comments
 (0)