问题
:::warning
Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
:::
问题归因
将 Package 组件写成箭头函数形式:const Package = () => {.} 而 forwardRef 不支持此写法 var Package = function Package(props) {
解决方式
修改为如图方式:export default forwartRef((props, ref) => { ... })
