Closed YCyoon1994 closed 2 years ago
SonarCloud Quality Gate failed.
activeIdol(e,data){ console.log(e,data); console.log(this); if(e.target.classList.contains("is-active")){ e.target.classList.remove("is-active"); }else{ e.target.classList.add("is-active"); } } 대신에 activeIdol = (e,data) => {} 이런식으로 정의하면 this를 bind 해줄 필요가 없기 때문에 코드 길이를 좀 더 줄일 수 있을거 같습니다!
코드 업데이트 진행하겠습니다 :)