https://react-ko.dev/reference/react/memo
์ปดํฌ๋ํธ์ props๊ฐ ๋ณ๊ฒฝ๋์ง ์์ ๊ฒฝ์ฐ ๋ฆฌ๋ ๋๋ง์ ๊ฑด๋ ๋ธ ์ ์๋ค.
const MemoizedComponent = memo(SomeComponent, arePropsEqual?)Props
Component: ๋ฉ๋ชจํ ํ๋ ค๋ ์ปดํฌ๋ํธarePropsEqual(optional) : ์ปดํฌ๋ํธ์ ์ด์ prop ๋ฐ ์๋ก์ด prop์ ๋ ์ธ์๋ฅผ ๋ฐ๋ ํจ์.- ์๋ก์ด prop๊ณผ ์ด์ prop์ด ๊ฐ์ผ๋ฉด true๋ฅผ ๋ฐํํด์ผํ๋ค.
- ์ผ๋ฐ์ ์ผ๋ก๋
Object.is๋ก ์ ์ฉ๋๊ณ , ๋ฐ๋ก ์ง์ ํ์ง ์๋๋ค.