728x90 728x90 warning2 [Warning] Warning: Each child in a list should have a unique "key" prop. 반복문을 사용한 부분에 key를 적용했는데도 이런 에러가 뜨고 있어서 확인해보니,,,!! [ 원인 ] { array?.map((item, i) => { return ( ); }) } 혹은 축약형 를 사용할 때 key를 부여해야 하는 경우도 있다. 만약 리스트 아이템을 묶는 에 key를 주어야 한다면, 직접 를 사용하고 여기에 key를 부여해야한다고 함. { array?.map((item, i) => { return ( ); }) } 2024. 1. 15. [Warning] value prop on select should not be null. 개발진행하다가 콘솔에 warning 문구들을 하나씩 해결하던 중 Warning: value prop on select should not be null. Consider using an empty string to clear the component or undefined for uncontrolled components. [ 원인 ] - select에 사용하는 state 최초값을 null로 설정을 했더니 옵션에 없어서 남 ㅋㅋ *** 추가적으로 value prop on input should not be null. Consider using an empty string to clear the component or undefined for uncontrolled components. const [tes.. 2024. 1. 11. 이전 1 다음 728x90 728x90