Warning: Function components cannot be given refs

报错 Warning: Function components cannot be given refs. Attempts to access this ref will fail. 问题来源 咱们有一个子组件,外部父组件经过 ref 获取子组件的DOM。如今须要给子组件添加翻译(i18N)。html export default ChildComponent; // 改为下面的 export
相关文章
相关标签/搜索