useEffect(() => {
getCodeList();
}, []);
React Hook useEffect has a missing dependency: 'getCodeList'. Either include it or remove the dependency array react-hooks/exhaustive-deps
์ด๋ฐ warning์ด ๋ฌ๋ค.
useEffect(() => {
getCodeList();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
์ด๋ ๊ฒ ์ฃผ์ ๋ฌ์์ฃผ๋ฉด warning์ด ๋จ์ง ์๋๋ค.
'Programming > React' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[ React ] ๊ทธ๋ฆฌ๋์์ ๊ฐ ํฌ๋งท ์ง์ ํด์ฃผ๊ธฐ (AG GRID valueFormatter ์ฌ์ฉ) (0) | 2022.07.15 |
---|---|
[ React ] ๊ฐ์ธ ํ๋ก์ ํธ ๋ฆฌ์กํธ ๊ฐ๋ฐํ๊ฒฝ ์ ํ (0) | 2022.07.14 |
[ React ] filter ํจ์ ์ฌ์ฉํ๊ธฐ (ํํฐ๋ฅผ ํตํด ์๋ก์ด ๋ฐฐ์ด์ ๋ฐํ) (0) | 2022.07.07 |
[ React ] useState (0) | 2022.06.21 |
[ React ] ํ์ดํ ํจ์ (0) | 2022.06.21 |