我最近升级到了 React 版本 16.10.2
。在使用 And Design Components 时面临错误。
我想使用版式中的标题。 这是我之前所做的。
import { Typography } from 'antd'
const { Title } = Typography
<Title level={4}>Hello World</Title>
我在控制台
中遇到错误,如下
Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
最佳答案
此问题已在 antd@3.23.6 中修复:https://github.com/ant-design/ant-design/pull/19074
关于javascript - 使用 Ant Design Components 升级到 React 版本 16.10.2 时出错。函数组件不能被指定引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58266086/