React 从另一个组件更新组件状态 [英] React update component state from another component
问题描述
我有一个组件如下:
var SingleEditableModule = React.createClass({getInitialState: 函数() {返回 {选择:假};},show_overlay:函数(){$('.overlay').fadeIn();},渲染:函数(){var show_overlay = this.show_overlay;返回 (<div className="large-4 small-12 列"><h3 className="title">{this.props.data.title}</h3><div className="月"><p>{this.props.data.month}</p>
<div className="img-holder">
<h4>{this.props.data.title_description}</h4><p>{this.props.data.description}</p>