일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- async/await
- Cypress
- CI/CD
- map
- webpack
- app router
- 공변성
- dfs
- useAppDispatch
- TS
- autosize
- SSR
- recoil
- 투포인터
- Promise
- 결정 알고리즘
- CORS
- ESlint
- Jest
- 반공변성
- 태그된 유니온
- RTK Query
- 호이스팅
- 이분 검색
- 리터럴 타입
- tailwind
- 인터섹션
- 타입 좁히기
- 무한 스크롤
- React
Archives
- Today
- Total
목록class 합성 (1)
짧은코딩
useSelectedLayoutSegment, classnames 라이브러리
useSelectedLayoutSegment useSelectedLayoutSegment는 ActiveLink를 만들 때 유용한 hooks이다. next에 내장되어 있는 기능이다. -useSelectedLayoutSegment import {useSelectedLayoutSegment} from "next/navigation"; export default function NavMenu() { const segment = useSelectedLayoutSegment(); console.log(segment); return ; } 만약 "compose/tweet" 주소에 있으면, segment는 "compose"가 나온다. 즉, useSelectedLayoutSegment는 최상위 부모 경로만 나온다. -u..
인프런, 유데미/z 클론 코딩
2024. 3. 16. 16:37