控制台报错:Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
react封装了一个公共组件(组件中使用了connect连接redux)其它地方引用该组件后就会提示以上错误
解决办法:导出组件的时候添加 { forwardRef: true }
export default connect(mapState, mapDispatch, null, { forwardRef: true })(组件)