React와 관련된 유용한 컴포넌트
와 커스텀 훅
을 제공하는 라이브러리입니다.
@modern-kit
의 공식 문서는 아래 웹사이트에서 확인하실 수 있습니다
npm i @modern-kit/react
yarn add @modern-kit/react
pnpm i @modern-kit/react
import { useInterval } from '@modern-kit/react';
const App = () => {
useInterval(() => {
console.log('interval');
}, 300);
return <div>Modern Kit</div>;
}
// SubPath 사용 예시
// tsconfig moduleResolution 옵션이 `bundler`일 경우
import { flatten } from '@modern-kit/utils/array/flatten';
// tsconfig moduleResolution 옵션이 `node`일 경우
import { flatten } from '@modern-kit/utils/dist/array/flatten';
const arr = [1, [2, [3, 4], 5]];
const result = flatten(arr); // [1, 2, 3, 4, 5]
MIT © Modern Agile. See LICENSE for details.