Správná architektura aplikace React Native zahrnuje organizaci kódu, oddělení concerns (UI, logika, data), výběr správy stavu a strukturování pro udržovatelnost, testovatelnost a škálovatelnost. Dobrá architektura je důležitá, když aplikace rostou.
Organizace projektu
Organize code by FEATURE or by TYPE (feature-based scales better for large apps):
src/features/auth/{components, screens, hooks, api, store}/ (feature-based)
OR src/{components, screens, hooks, services, store, navigation, utils}/ (type-based)
→ Keep related code together; separate reusable from feature-specific code.
