【发布时间】:2017-09-13 17:28:59
【问题描述】:
请问,我该如何以另一种方式重写此代码以避免出现以下错误?
render() {
const { children, ...props } = this.props;
return <div {...props} ref={this.setRef}>{children}</div>
}
我收到此错误:
标签上的未知道具onClickOutside。从元素中移除这个道具。详情(https://facebook.github.io/react/docs/higher-order-components.html#static-methods-must-be-copied-over)
【问题讨论】:
-
您在此列表中看到
onClickOutside吗? developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes
标签: javascript reactjs