Skip to content

Tag: react-state

More elegant way of checking all state values

Is there a more elegant way of checking all state variables in my react app ? I currently have 14 state variables within my app, I am checking the value of each and updating to an empty string if they do not pass validation (left empty) code is as: This does work, so its not the end of the world,