Hello ,
How can you assist me with this problem. I am trying to add a shouldComponentUpdate() method but I always get back the same error messages:
- The shouldComponentUpdate method should return true for next state field currentValue is more then 4.
&&
- The App component should be rerendered after 5 and more clicks on Update button
This is my implementation:
shouldComponentUpdate(nextState) {
if(nextState.currentValue > 4) {
return true;
} else {
return false;
}
}
Thank you in advance.