Solve problem with unnamed component, which created with arrow function.
export const FancyComponentName = memo(
({ name }) => <div>{name}</div>);
export const FancyComponentName = memo(
({ name }) => <div>{name}</div>);
FancyComponentName.displayName = "Memo(FancyComponentName)";
npm install @babel/core babel-plugin-react-wrapped-display-name
module.exports = (api) => ({
plugins: [
'babel-plugin-react-wrapped-display-name',
],
});
babel --plugins babel-plugin-react-wrapped-display-name
require('@babel/core').transform(code, {
plugins: [
'babel-plugin-react-wrapped-display-name',
],
});