Skip to content

Commit 6a99c93

Browse files
peterlenaghtimdorr
authored andcommittedMar 29, 2019
fix: set DisplayName correctly for Named Context (#6677)
1 parent 13b044a commit 6a99c93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎packages/react-router/modules/RouterContext.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import createContext from "create-react-context";
33

44
const createNamedContext = name => {
55
const context = createContext();
6-
context.Provider.displayName = `${name}.Provider`;
7-
context.Consumer.displayName = `${name}.Consumer`;
6+
context.displayName = name;
7+
88
return context;
99
}
1010

0 commit comments

Comments
 (0)
Please sign in to comment.