Reactjs

来自tomtalk
Tom讨论 | 贡献2016年1月27日 (三) 08:59的版本 (创建页面,内容为“==bind(): React component methods may only be bound to the component instance.== If you get this error: bind(): React component methods may only be bound to the com...”)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航搜索

bind(): React component methods may only be bound to the component instance.

If you get this error: bind(): React component methods may only be bound to the component instance. It’s probably because you are using ES5 bind on a component property in order to curry a property and you are passing in a scope as the first argument (such as this). A simple fix is to pass null in as the scope argument.