question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add `displayName` for Context component

See original GitHub issue

Is your feature request related to a problem? Please describe.

Add displayName for Context component to improve DX

SomeContext.Consumer.displayName = "SomeContext.Consumer";
SomeContext.Provider.displayName = "SomeContext.Provider";

Describe the solution you’d like

Describe alternatives you’ve considered N/A

Additional context N/A

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
alfdocimocommented, Oct 29, 2019

Hi! I just found out about this awesome library and would very much like to help out! is this enhancement already planned? If not, I’d like to contribute with this if that’s okay 😊

0reactions
TejasQcommented, Jan 14, 2020

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Context - React
Context object accepts a displayName string property. React DevTools uses this string to determine what to display for the context. For example, the...
Read more >
React Reference Guide: Context API - LogRocket Blog
Context.displayName is a string property from the React.createContext method call. The React DevTools will use ...
Read more >
reactjs - Is it possible to change the displayName of a Context ...
This works (at least on React v16.3.0+): SomeContext.Consumer.displayName = "SomeContext.Consumer"; SomeContext.Provider.
Read more >
Context.displayName - react - Web Coding Center
Context object accepts a displayName string property. React DevTools uses this string to determine what to display for the context. RESETRUNFULL
Read more >
Allow to specify displayName for createContext() providers ...
React can't "guess" the name from the declaring code but we should probably make it possible to specify displayName manually for React DevTools....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found