I have a const in ReactJS which is an object and I want to loops over it to set all values to undefined to reset the state and re-render the component to get a clean form
const [newPayee, setNewPayee] = useState<INewPayee>(() => {
return {
appUserId: userInfo.id,
fullName: '',
phoneNumber: '',
email: '',
streetAddress: '',
city: '',
postalCode: '',
stateId: 0,
bankId: 0,
bankAccountNo: '',
bankInstitutionNo: '',
transitNo: '',
note: ''
}
});