Skip to content

Commit

Permalink
Set displayName for ApolloContext for easier debugging (#7550)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Newman <ben@apollographql.com>
  • Loading branch information
dulmandakh and benjamn authored Jan 11, 2021
1 parent 0975cc8 commit 4a5822a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/react/context/ApolloContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export function getApolloContext() {
let context = cache.get(React.createContext)!;
if (!context) {
context = React.createContext<ApolloContextValue>({});
context.displayName = 'ApolloContext';
cache.set(React.createContext, context);
}
return context;
Expand Down

0 comments on commit 4a5822a

Please sign in to comment.