babel-plugin-observer-displayname
v0.0.1
Published
A simple babel plugin that adds `displayName` values to `observer` calls.
Downloads
1
Readme
babel-plugin-react-createcontext-displayname
A simple babel plugin that adds displayName
values to observer
calls.
Useful if you use mobx-react-lite
. Probably not useful if you don’t.
In:
const MyComponent = observer(props => {
// ...
});
Out:
const MyComponent = observer(props => {
// ...
});
if (process.env.NODE_ENV === 'development') {
MyComponent.displayName = 'observer(MyComponent)';
}