0

I am new to TS. I am wondering if it's possible to combine these into one or two line?

if(Status != null){
  setSettings({ ...mSettings, fieldA: Status })
}    
if(Value != null){
  setMSettings({ ...mSettings, fieldB: Value})
}
user3464179
  • 89
  • 3
  • 8

0 Answers0