Skip to content

Commit

Permalink
Replace React$Context with imported type in relay
Browse files Browse the repository at this point in the history
Reviewed By: gkz

Differential Revision: D69188761

fbshipit-source-id: 3b97ea65afab70ead594d447ecda67e08fdd8520
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Feb 5, 2025
1 parent f9c9e7f commit ac7a7c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/relay-runtime/store/createRelayContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
'use strict';

import type {RelayContext} from './RelayStoreTypes.js';
import type {Context} from 'react';
import typeof {createContext} from 'react';

const invariant = require('invariant');
Expand All @@ -24,10 +25,10 @@ type React = $ReadOnly<{
...
}>;

let relayContext: ?React$Context<RelayContext | null>;
let relayContext: ?Context<RelayContext | null>;
let firstReact: ?React;

function createRelayContext(react: React): React$Context<RelayContext | null> {
function createRelayContext(react: React): Context<RelayContext | null> {
if (!relayContext) {
relayContext = react.createContext(null);
if (__DEV__) {
Expand Down

0 comments on commit ac7a7c7

Please sign in to comment.