【发布时间】:2017-02-06 12:52:23
【问题描述】:
我有一个组件 ProductList - 它是一个父组件。在 m 渲染方法中我写了这样的代码
return (
<div>
<CustomBreadCrumbs routes={this.props.routes} params={this.props.params} />
{ this.props.children ? this.props.children :
<section className="content">
Parent
</section>
}
</div>
);
当我在子组件中编辑某些信息时,我的父组件会重新渲染,但我想阻止它。我该怎么办?
【问题讨论】:
标签: javascript reactjs