Skip to content

Commit

Permalink
fix: set DisplayName correctly for Named Context (#6677)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterlenagh authored and timdorr committed Mar 29, 2019
1 parent 13b044a commit 6a99c93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-router/modules/RouterContext.js
Expand Up @@ -3,8 +3,8 @@ import createContext from "create-react-context";

const createNamedContext = name => {
const context = createContext();
context.Provider.displayName = `${name}.Provider`;
context.Consumer.displayName = `${name}.Consumer`;
context.displayName = name;

return context;
}

Expand Down

0 comments on commit 6a99c93

Please sign in to comment.