I am new to the react and js scene and i might be missing a huge thing here so bear with me.
I have a nested if's, else if's and else's all over the place. And as the titles say i got an if statement that skips even though the statement is true and skips to else if which is FALSE at that time.
I check the states just in case if its not working before the "if statement" that does not work via console but no luck there too. States are working perfectly fine.
You might say where is the code.I dont want to bother you people with my code itself.
All the ideas,questions and answers are much appreciated. Thanks.
if(){
//send data to state here via props
}
else if() {
//send data to state here aswell
if(){ //check with other states
if(){ //another check with props
if(){ //the problem
}
else if(){//and this is the "else if" that skips to even though the if right above is returns true
}
else{
}
}
else{
if(){
}
else{
}
}
}
else{
}
}
else {
}
Aucun commentaire:
Enregistrer un commentaire