I want to render a value if my Id is true if the Id is false the value shouldnt exist, is it possible to render what values formik
initialValues={{
id:currentBankData.id || '',
name: currentBankData.name || '',
address: currentBankData.address || '',
country: currentBankData.country || '',
region: currentBankData.region || '',
city: currentBankData.city || '',
swiftCode: currentBankData.swiftCode || '',
routeCode: currentBankData.routeCode || '',
//Example want to do something like this
if(Id){
imageBinairyData: currentBankData.image ||'' ,
}else{
image: currentBankData.image || '',
}
}}
Try this
So your code may look like