How can I find my way around nested Contexts and avoid this hell?
Asked
Active
Viewed 2,018 times
2
-
how did that even happen? – Omar May 02 '18 at 17:39
-
1Well as of now there isn't a way in react-devtools to separate out the Context displayname, there is an open issue on the same https://github.com/facebook/react-devtools/issues/1008 – Shubham Khatri May 02 '18 at 17:46
1 Answers
1
This works (at least on React v16.3.0+):
SomeContext.Consumer.displayName = "SomeContext.Consumer";
SomeContext.Provider.displayName = "SomeContext.Provider";

Niki
- 1,105
- 1
- 10
- 17