There is a serious bug about shouldComponentUpdate
ovaldi opened this issue · 2 comments
ovaldi commented
@themr('tab', styles)
class Tab extends React.PureComponent {
... ...
render () {
<div className={ theme.tab } onClick={ this.props.onClick }>
{ this.props.children }
</div>
}
}
class Tabs extends React.Component {
state = {
text: 'blue'
}
handleClick = () => {
this.setState({
text: 'gray'
});
}
render () {
const { text } = this.state;
return (
<Tab onClick={ this.handleClick }>
<Daily text={ text }/>
</Tab>
);
}
}
When I trigger handleClick, the Daily will not update anything, because shouldComponentUpdate always return false in themr.js.

markusguenther commented
Thanks for reporting this issue ... hope that I`ll find time for that asap. But it would be awesome to receive a PR ;)
ovaldi commented
@markusguenther i have send a PR, pls check it when you have time, thanks!