일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- app router
- Promise
- 인터섹션
- React
- 무한 스크롤
- 타입 좁히기
- 리터럴 타입
- CORS
- 결정 알고리즘
- async/await
- 공변성
- recoil
- map
- TS
- CI/CD
- 이분 검색
- tailwind
- RTK Query
- 투포인터
- 태그된 유니온
- Cypress
- ESlint
- dfs
- useAppDispatch
- 반공변성
- webpack
- autosize
- SSR
- 호이스팅
- Jest
Archives
- Today
- Total
목록useSelectedLayoutSegment (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