Why split property is undefined here? I fetched the products from my product api through axios, I received json data that have some properties(name,description,…)
const [product, setProduct] = useState({});
let substrings=[];
useEffect(() => {
const getProduct = async () => {
try {
const res = await axios.get(`/products/${props.match.params.id}`);
setProduct(res.data);
} catch (error) {
console.error(error);
}
};
getProduct();
//eslint-disable-next-line
}, []);
const substrings = product.description.split(".");
This is the json that we get from products/id
{"_id":"1","name":"Mangoes","image":"https://drive.google.com/thumbnail?id=1Iq2F4fYxDi7HdX-IJcRuON-CbNuK-pxd","description":"This sweet and fresh mangoes make your day sweet","category":"Fruits","keywords":"fruits","price":120,"countInStock":0,"content":""}
whereas it works fine here
const [product, setProduct] = useState({});
const [desc,setDesc]=useState("");
useEffect(() => {
const getProduct = async () => {
try {
const res = await axios.get(`/products/${props.match.params.id}`);
setProduct(res.data);
setDesc(res.data.description);
} catch (error) {
console.error(error);
}
};
getProduct();
//eslint-disable-next-line
}, []);
const substrings = desc.split(".");
Can anyone tell us why is it so?
http://iwermectin.com topical ivermectin for humans over the counter
https://wardenafil.com free levitra trial offer
accutane for sale – accutane from mexico how much is accutane uk
https://levitradd.com/ levitra how long
buy amoxicilin 500 mg online mexico – purchasing amoxicillin online buy amoxicilina 500 mg
http://levitradd.com/ levitra drugstore
generic vardenafil 10mg – vardenafil professional vardenafil 20mg
http://ivermectineffects.com stromectol
https://himscanada.com/ buy 5mg cialis
ivermectin 50 – price of ivermectin tablets oral ivermectin cost
ivermectin 1% – cost of ivermectin pill where can i buy stromectol
buy accutane 5mg – accutane uk prescription buy isotretinoin online
http://cialis20walmart.com buy cialis for daily use online
http://prescriptionhim.com/ buy generic viagra without a prescription
https://himshairloss.com/ proscar
average cost of viagra – sildenafil 100mg online price for generic viagra
http://dapoxetineus.com dapoxetine pills for sale
cialis 10mg purchase – cialis online india pharmacy tadalafil 10mg online
ivermectin 6mg tablet for lice – ivermectine online ivermectin 1%
modafinil adhd – buy provigil modafinil interactions
https://stromectolhumans.com/ ivermectin tablets dosage
http://iwermectin.com/ ivermectin
can you buy female viagra over the counter – cheap viagra pills india sildenafil generic mexico
https://ivermectineffects.com/ ivermectin for humans stromectol
https://ivermectinovercounter.com/ como tomar ivermectina
america’s top doctors 2014 health risks of not bathing regularly
ivermectin for humans https://ivermectinhome.com
http://ivermectinus.com/ is ivermectin safe for people
https://zithrozpack.com/ zithromax cost
normal blood pressure for women over 50 american heart association blood pressure
como se toma la ivermectina https://ivermectinhome.com
how much is the penalty to not have health insurance the veterans’ health care eligibility reform act passed in ______.
stromectol 3mg https://ivermectinhome.com
low blood pressure in women blood pressure msn article
ivermectin https://ivermectinhome.com
bmc medical education foods that lower blood pressure
ivermectin over the counter https://ivermectinhome.com
ivermectin for humans http://ivermcov.com/# ivermectin tablets
where does a physician work https://ventolinhfaer.com/ treatment for asthma
Albuterol online – ventolin price australia order Albuterol
united healthcare insurance on health insurance what does it mean out of pocket cost
stromectol https://ivermectinhome.com
buy doxycycline online – doxycycline 100mg price doxycycline without rx
what health insurance in carried in uowa http://vardenafilz.com levitra over counter at levitraye
online drugstore viagra – where to get viagra over the counter
cobra health insurance ivermectina https://iveramectin.com ivermectin
bestdoctors http://iwermectin.com where to buy ivermecium pill for humans
tadalafil generic south africa – buy cialis online safely buy cialis online with prescription
which type of distance is usually used when taking a blood pressure http://viagrob.com price for viagra
prednisone 20mg online pharmacy – prednisone without prescription prednisone 20mg tab price
accutane purchase online uk – accutane canada cost price of accutane in australia
viagra without a doctor prescription canada https://viagrob.com viagra 120 pills
amoxicillin online – amoxicillin for sale uk amoxicillin for sale in usa without px
help with research paper – essay cheap purchase essay online
Cannot Read Property ‘split’ of Undefined in the below code – JavaScript Help cetirizine side effects over 65 http://allergyd.com cvs zyrtec price
stromectol walmart ivermectin for humans https://stromectl.com ivermectin for humans for sale
ivermectin 250ml – buy stromectol for humans ivermectin 20 mg
prednisone order – prednisone 10mg online buy prednisone without a prescription
cytotec 200 mcg price in india – purchase cytotec online buy cytotec online fast delivery
doxycycline 100mg acne – medicine prednisolone 5mg prednisolone buy online
http://pharmvolk.com – best online pharmacies
ivermectin for people – generic stromectol for humans ivermectin 500ml
azithromycin over counter https://azithrozpack.com interactions for zithromax z pak
ivermectin price uk http://ivermectin1.com/ stromectol 3mg tablets
stromectol xr – stromectol ebay ivermectin 10 ml
http://stromectolo.com – ivermectin 12mg
tadalafil generic – tadalafil 20mg tadalafil cheap tadalafil
isotretinoin 10mg – accutane cost in uk how can i get accutane online
cost of ivermectin pill – ivermectin online ivermectin uk
https://ivrmectin.com – stromectol
buy online vardenafil in usa – canada pharmacy online ed medication online
buy cetirizine hydrochloride 10mg – https://allergyd.com
http://stromectolforte.com/# cost of ivermectin 1% cream
xenical pills price – orlistat costo xenical 120mg reviews
ivermectin for humans https://stromectolforte.com/ order stromectol stromectol vloeistof
italian pharmacy online – mail order cialis buy cialis online without prescription
prices for prednisone – prednisone drops after cataract surgery where can i buy prednisone over the counter
ivermectin 500ml https://www.ivermecton.com/ ivermectin rezeptfrei
ivermectin buy uk – buy ivermectin pills ivermectin 2mg
buy ivermectin canada https://stromectolforte.com/ ivermectin ivermectin germany
non generic viagra – order viagra online viagra 50 mg tablet online
how much is cialis pills – cialis dosage 40 mg cialis 80
stromectol usa – iverstrom stromectol 12 mg
how long blood pressure affected from exercise http://sildenafilhim.com – sildenafil 50 mg tablet price
http://sildenafilhim.com cheapest erectile dysfunction pills
kjГёp ivermectin nz https://www.ivermectinhum.com/ stromectol australia
http://sildenafilhim.com – sildenafil 100 coupon
prednisone 10mg prices – prednisone 40mg no prescription 85g prednisone
can you buy real viagra from canada https://www.viagwdp.com/ where to buy viagra pills viagra 5343
nrpwzyx http://otcstromectol.com/ ivermectin sk
stromectol http://stromectol.today obsergo
purchase ivermectin stromectol 6 mg dosage how long until ivermectin starts to work how much ivermectin is too much to give my dogs
buy generic cialis online with mastercard https://cialistrxy.com/
cheap lyrica 75mg – order zithromax 250mg pills azithromycin order online
buy doxycycline generic – generic doxycycline 200mg levothyroxine generic
cialis at canadian pharmacy tadalafil side effects
tadalafil cost walmart where to buy generic cialis online safely
cenforce without prescription – buy acyclovir 400mg for sale buy acyclovir 800mg pills
tadalafil order online no prescription best price usa tadalafil
where to buy generic cialis online safely tadalafil
https://cialismat.com/ tadalafil cialis
buy cialis online cheap – tadalafil 5mg canada fda ivermectin
tadalafil order online no prescription tadalafil brands
tadalafil lowest price cialis
buy cialis tadalafil generic
buy generic cialis online with mastercard cost of cialis
where to get tadalafil tadalafil daily online
https://cialismat.com/ buy tadalis
cialis at canadian pharmacy what is tadalafil
cheap generic cialis for sale best price usa tadalafil
buy tadalafil tadalafil online
stromectol tablets
stromectol without a doctor prescription