setstate zbyt wolno

function() {
  var tempVar = objOld + newStuff;
  
  setObjOld(tempVar);
  //code that needs updated state
}
Defiant Dove