Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react jsx 与antv jsx冲突 #2022

Open
rl58xz opened this issue Nov 22, 2024 · 1 comment
Open

react jsx 与antv jsx冲突 #2022

rl58xz opened this issue Nov 22, 2024 · 1 comment

Comments

@rl58xz
Copy link

rl58xz commented Nov 22, 2024

  • F2 Version: v4.x
  • Platform: vite,react
  • Mini Showcase(like screenshots):
  • CodeSandbox Link:
@rl58xz
Copy link
Author

rl58xz commented Nov 22, 2024

按照官网配置tsconfig如下:
{
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "@antv/f2"
}
}
后,react组件无法识别,会在ts中提示错误。

如果去掉jsxImportSource配置,则antv中组件例如:group,text等,无法在ts中识别。
提示错误: “类型“JSX.IntrinsicElements”上不存在属性“group”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant