variable shadowing

variable shadowing은 외부에서 전달되어 들어오는 변수명과 내부에서 사용 되는 변수명과 같을 때 생기는 문제이다.

그래서 Hook에서 외부에서 받아오는 countnumber의 변수 명을 다르게 해준다. 이 둘이 가리키는 값은 같다.

Last updated

Was this helpful?