我正在使用以下内容来延迟加载组件。
const Image: React.ReactNode = React.lazy(() => import(/* webpackChunkName: "Image" */ '../../components/image/image').then((({ Image }) => ({ default: Image }))))
但是,出现以下错误:
JSX元素类型“图像”没有任何构造或调用签名。 TS2604
我正在跑步:
"@types/node": "^12.0.10",
"@types/react": "^16.8.22",
"@types/react-dom": "^16.8.4",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-scripts": "3.0.1",
"typescript": "^3.4.4"
有什么想法吗?