I am doing a conditional in my shouldComponentUpdate method and if the condition matches return true, else return false... however I am still getting a "returned undefined instead of a boolean ..." as the title suggests.
Here is my method: * Note if I don't have the setTimeout it automatically assumes that nextProps.props.length is 0 even when its more than 0
shouldComponentUpdate(nextProps){
setTimeout(()=>{
console.log(nextProps.props, nextProps.props.length);
if(nextProps.props.length > 0){
return true;
}else{
return false;
}
},1000)
}
setTimeout?