我正在使用Typescript编写ReactJS应用程序,但不知道如何指定双向绑定:
https://facebook.github.io/react/docs/two-way-binding-helpers.html
React.Component类中没有可用的valueLink。该组件可以实现LinkedStateMixin接口,但我不知道linkState方法应该包含什么内容以及如何将所有内容连接在一起。
有人可以提供一些示例吗?
https://facebook.github.io/react/docs/two-way-binding-helpers.html
React.Component类中没有可用的valueLink。该组件可以实现LinkedStateMixin接口,但我不知道linkState方法应该包含什么内容以及如何将所有内容连接在一起。
有人可以提供一些示例吗?
React.Component 类中可用的 valueLink 属性
这是因为 React 类 不支持 混入。
要使用 LinkedStateMixin
混入,您需要使用 createClass
,但在 TypeScript / ES6 类型的代码安全性方面,这是完全不推荐的。
https://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html