reactjs - Can you use React.addons.PureRenderMixin with components that use props.children? -
example:
will component re-render expected when updatename
called if mycomponent
uses react.addons.purerendermixin
?
... render() { return <mycomponent> <helloworld name={ this.state.name } /> </mycomponent>; } updatename() { this.setstate({name: 'fred'}); }
it "renders same result given same props , state", when call this.setstate({name: 'fred'})
re-render assuming this.state.name !== 'fred'
Comments
Post a Comment