JSX元素类型没有任何构造或调用签名 [英] JSX element type does not have any construct or call signatures

查看:3079
本文介绍了JSX元素类型没有任何构造或调用签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将左边的这个简单的React元素用作右边页面上的根元素.

I'm using this simple React element on the left as my root element on the page in the right.

如何解决显示的错误?

推荐答案

尽管我一点都不理解,但这种骇人听闻的类型转换使错误消失了.

This hacky typecast makes the error go away, though I don't understand it at all:

const App: any = require('./components/views/app/app');

这篇关于JSX元素类型没有任何构造或调用签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆