useEffect(()=>{ //after game ends if(gameEnd){ props.gameEndHandler(Score) } if(!props.gameEnd){ setScore(prev=>({ ...prev, XScore: 0, OScore: 0,