Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- 귤 고르기
- 42747
- 오블완
- Helmet
- useoutletcontext
- usesetrecoilstate
- Outlet
- 프로그래머스
- React
- userecoilvalue
- programmers
- H-index
- Typescript
- 138476
- 티스토리챌린지
- Recoil
- 노마드코더
Archives
- Today
- Total
목록Outlet (1)
오늘도 코딩하나
[React] Crypto Tracker #2 - Props 없이 상태 관리하기 (Nested Router & Recoil)
강의 내용: 강의 링크#5.11 ~ #6.4 1️⃣ nested router props 처리react-router-dom v5에서는 prop를 직접 전달할 수 있지만,react-router-dom v6에서는 prop를 직접 전달할 수 없으므로,Outlet을 사용해 자식 컴포넌트가 부모의 데이터를 공유할 수 있도록 한다. ( 이유에 대한 자세한 설명은 nested Routes 설명 참고 👉 설명보러가기 )// Coin.tsx// Chart.tsxinterface IOutletProps { coinId: string;}function Chart() { const { coinId } = useOutletContext();} 📌 Outlet에서 context를 설정하면 자식 컴포넌트에서 useO..
React/노마드코더
2025. 2. 20. 18:22