diff --git a/Changelog.md b/Changelog.md index 04db8d4aa0..edf1389144 100644 --- a/Changelog.md +++ b/Changelog.md @@ -7,6 +7,9 @@ - Make sure `MockedProvider` is using the proper CJS/ESM bundle, when referencing `ApolloProvider`.
[@jure](https://github.com/jure) in [#3029](https://github.com/apollographql/react-apollo/pull/3029). +- Adjust the `ApolloContext` definition to play a bit more nicely with + `React.createContext` types.
+ [@JoviDeCroock](https://github.com/JoviDeCroock) in [#3018](https://github.com/apollographql/react-apollo/pull/3018) ### Bug Fixes diff --git a/src/ApolloContext.ts b/src/ApolloContext.ts index 6bf02b68d3..5a16a1706b 100644 --- a/src/ApolloContext.ts +++ b/src/ApolloContext.ts @@ -7,6 +7,5 @@ export interface ApolloContextValue { operations?: Map; } -export const ApolloContext = React.createContext - ? React.createContext(undefined) - : null; +export const ApolloContext = React.createContext && + React.createContext(undefined)