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

Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release. #452

Open
litongjava opened this issue Jan 7, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@litongjava
Copy link

重现步骤

在线示例链接:(必填)

步骤:
1.
2.
3.

当前行为

{
  "name": "tio-chat-demo",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev --turbopack",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@ant-design/icons": "^5.5.2",
    "@ant-design/nextjs-registry": "^1.0.2",
    "@ant-design/x": "^1.0.1",
    "antd": "^5.22.3",
    "antd-style": "^3.7.1",
    "next": "15.0.3",
    "openai": "^4.75.0",
    "react": "^18",
    "react-dom": "^18"
  },
  "devDependencies": {
    "@types/node": "^20",
    "@types/react": "^18",
    "@types/react-dom": "^18",
    "eslint": "^8",
    "eslint-config-next": "15.0.3",
    "typescript": "^5"
  }
}

使用nextjs 构建时出现了上面的错误

预期行为

No response

上下文

Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.

版本

"@ant-design/x": "^1.0.1",

您在哪些浏览器上遇到了这个问题?

No response

@litongjava litongjava added the bug Something isn't working label Jan 7, 2025
@YumoImer
Copy link
Collaborator

YumoImer commented Jan 9, 2025

我按照你的依赖,X 版本为 1.0.4 ,没有遇到这个告警
image

@litongjava
Copy link
Author

神奇,我录制一个视频,你看一下 这是我的代码的开源地址,我这边是在国外
https://github.com/litongjava/next-js-antdx-demo

Accessing.element.ref.was.removed.in.React.19.ref.is.now.a.regular.prop.It.will.be.removed.from.the.JSX.Element.type.in.a.future.release.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants