🔧 This rule is automatically fixable by the
--fix
CLI option.
주어진 경로의 React 컴포넌트들을 자동으로 memoize 합니다.
변수 선언문, 함수 표현식으로 작성된 컴포넌트를 memoize 합니다.
함수 선언문으로 작성된 컴포넌트는 memoize 하지 않습니다.
const Foo = () => {
return <></>
}
const Bar = function () {
return <></>
}
function Foo() {
return <></>
}
memoize 할 컴포넌트의 경로를 지정합니다.
{
"path": ["/src/assets/*.tsx", "/src/components/assets/*!(.stories).tsx"]
}
{
"@naverpay/memo-react-components": [
"warn",
{
"path": ["/src/assets/*.tsx", "/src/components/assets/*!(.stories).tsx"]
}
]
}