【发布时间】:2021-07-12 06:28:44
【问题描述】:
我正在尝试构建一个应用程序,我想在其中显示连接组件之间的箭头。我发现的一个很棒的项目是react-xarrows,但是当我尝试在我的代码中使用它时,我看到了一个错误:
ReferenceError: 元素未定义。
以下是我的tsconfig.js
{
"compilerOptions": {
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"target": "es5"
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx"
],
"exclude": [
"node_modules"
]
}
【问题讨论】:
标签: reactjs typescript dom next.js