탐색과 라우팅 아키텍처
스택, 탭, 딥 링크, 라우트 가드를 사용해 앱이 성장해도 흐름을 예측 가능하게 유지하는 깔끔하고 확장 가능한 모바일 앱 탐색 계층을 설계합니다.
탐색과 라우팅 아키텍처은(는) CoddyKit의 무료 Indie Hacker Mobile Apps 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Indie Hacker Mobile Apps 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Indie Hacker Mobile Apps 강의에는 총 4개의 강의가 포함되어 있습니다.
이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.
Navigation Is Architecture
How users move through your app is a core architectural concern, not an afterthought. A messy navigation layer leaks state and breaks the back button.
This lesson covers patterns that keep flows predictable.
The Navigation Stack
Mobile navigation is built on a stack: pushing a screen adds it on top, going back pops it off.
- Push: go deeper
- Pop: go back
- Replace: swap the top screen
The stack mirrors the user's mental history.
Tabs and Nested Stacks
Most apps combine a tab bar with a stack inside each tab. Each tab keeps its own history, so switching tabs does not lose your place.
This nesting is the backbone of modern mobile UX.
Defining Routes
Centralize your route names so they are not scattered as magic strings. A route map keeps navigation consistent and refactor-safe.
const Routes = {
Home: 'home',
Profile: 'profile',
Settings: 'settings'
};
console.log(Routes.Profile);Passing Parameters
Screens often need data, like which item to show. Pass typed parameters with navigation rather than relying on global state.
function navigateToDetail(id) {
const params = { itemId: id };
return { route: 'detail', params };
}
console.log(navigateToDetail(42));Deep Linking
A deep link opens a specific screen from outside the app — a URL like myapp://item/42. Deep links power notifications, sharing, and marketing campaigns.
Map URL patterns to routes in one place.
Route Guards
Some screens require auth or a completed onboarding step. A route guard checks a condition before allowing navigation and redirects if it fails.
function canEnter(route, isLoggedIn) {
const protectedRoutes = ['profile', 'settings'];
if (protectedRoutes.includes(route) && !isLoggedIn) return 'login';
return route;
}
console.log(canEnter('profile', false));Separating Navigation from Screens
Screens should not know how navigation works internally. Inject a navigation service or callback so screens stay testable and reusable.
This decoupling keeps your architecture clean.
Handling Back Behavior
The hardware back button on Android and gestures on iOS must behave sensibly. Decide per screen whether back exits a flow, confirms a discard, or is blocked.
Predictable back behavior is a hallmark of polish.
Avoiding Navigation Spaghetti
As apps grow, avoid these traps:
- Hardcoded route strings everywhere
- Deeply nested stacks no one understands
- Business logic inside navigation handlers
A central route map and guards keep complexity in check.
A Clean Navigation Layer
Put it together:
- Central route definitions
- Tabs wrapping nested stacks
- Typed parameters between screens
- Deep link mapping in one place
- Guards for protected routes
This structure scales from MVP to mature app.
Quick Check
Test your navigation architecture knowledge.
Recap
You designed a navigation layer:
- Stacks model push/pop history; tabs hold nested stacks
- Centralize route names and pass typed parameters
- Deep links open specific screens from outside
- Guards protect restricted routes
- Decouple navigation from screens for testability
Clean navigation keeps flows predictable as you scale.
AI 튜터와 함께 Indie Hacker Mobile Apps을(를) 배우세요 — 무료
브라우저에서 실제 코드를 작성하고 실행하며, 24/7 AI 튜터로부터 즉각적인 도움을 받고, 웹이나 앱에서 중단한 부분부터 계속 학습하세요.
- 코스
- 12
- 레슨
- 48
자주 묻는 질문
“탐색과 라우팅 아키텍처” 강의는 무료인가요?
네 — “탐색과 라우팅 아키텍처” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Indie Hacker Mobile Apps 강의 전체를 잠금 해제할 수 있습니다. Indie Hacker Mobile Apps 강의에는 총 4개의 강의가 포함되어 있습니다.
“탐색과 라우팅 아키텍처”에서 뭘 배우나요?
스택, 탭, 딥 링크, 라우트 가드를 사용해 앱이 성장해도 흐름을 예측 가능하게 유지하는 깔끔하고 확장 가능한 모바일 앱 탐색 계층을 설계합니다. 브라우저에서 직접 실행하는 실습 코드로 Indie Hacker Mobile Apps을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.
Indie Hacker Mobile Apps을(를) 시작하는 데 경험이 필요한가요?
사전 경험은 필요하지 않습니다. CoddyKit의 Indie Hacker Mobile Apps은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.
“탐색과 라우팅 아키텍처” 강의는 얼마나 걸리나요?
대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.
이 Indie Hacker Mobile Apps 강의에서 코드를 작성하고 실행할 수 있나요?
네. 모든 Indie Hacker Mobile Apps 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.
이 강의의 모든 강의
- 모바일 앱 상태 관리
- 로컬 데이터 저장
- RESTful API 통합
- 탐색과 라우팅 아키텍처