A simple babel plugin that adds displayName
values to createContext
calls.
In:
const MyContext = createContext();
Out:
const MyContext = createContext();
if (process.env.NODE_ENV === 'development') {
MyContext.displayName = 'MyContext';
}
Add a displayName value to createContext calls
A simple babel plugin that adds displayName
values to createContext
calls.
In:
const MyContext = createContext();
Out:
const MyContext = createContext();
if (process.env.NODE_ENV === 'development') {
MyContext.displayName = 'MyContext';
}
Add a displayName value to createContext calls
Apache License 2.0