当前位置:网站首页>【next】nextjs打包出现组件定义缺少显示名称【Component definition is missing display name】

【next】nextjs打包出现组件定义缺少显示名称【Component definition is missing display name】

2022-06-21 22:26:00 沉默小管

在这里插入图片描述

解决流程

Component definition is missing display name
组件定义缺少显示名称
在内容里定义名称

const ShowMsgBox: NextPage<any> = (props:any,ref: any) => {
    
    return (
        <>1111</>
    )
}
//显示的名称
ShowMsgBox.displayName = "ShowMsgBox"
export default ShowMsgBox

个人网站:沉默博客
如有错误,请多多指教。
如对你有帮助,给个赞吧。

原网站

版权声明
本文为[沉默小管]所创,转载请带上原文链接,感谢
https://golangblog.blog.csdn.net/article/details/123163577