babel-plugin-react-observer-displayname

JSON →
library 0.0.2 ·javascript
verified Jun 4, 2026

A Babel plugin that automatically adds displayName to observer-wrapped components, primarily for use with mobx-react-lite. Version 0.0.2, last updated in 2022. Unlike manual displayName assignment, this plugin automatically detects observer calls and injects the displayName in development mode via process.env.NODE_ENV === 'development'. It only supports named function expressions and const declarations with arrow functions. No configuration required beyond adding to Babel plugins.