I do a form Login to Study on React... and this error i can't resolve..
TypeError: Cannot read property 'classList' of undefined
My Code Error:
changeState(){
const {isLogginActive} = this.state;
if(isLogginActive) {
this.rightSide.classList.remove("right");
this.rightSide.classList.add("left");
} else {
this.rightSide.classList.remove("left");
this.rightSide.classList.add("right");
}
this.setState((prevState)=> ({ isLogginActive: !prevState.isLogginActive }));
}
Some one can help me... have a one solution for this ... doing in React.
Thanks.
this.rightSideisundefined. But without a minimal reproducible example we can only guess why that is the case. - Andreas