--- id: FE-ARCH-REACT-MODERN-001 category: "10_Wiki/πŸ’‘ Topics/AI" confidence_score: 1.0 tags: [react, architecture, components, separation-of-concerns, domain-driven-design, hooks, scalability] last_reinforced: 2026-04-26 --- # Modern React Application Architecture Patterns (ν˜„λŒ€ React μ• ν”Œλ¦¬μΌ€μ΄μ…˜ μ•„ν‚€ν…μ²˜ νŒ¨ν„΄) ## πŸ“Œ ν•œ 쀄 톡찰 (The Karpathy Summary) > "UI λ Œλ”λ§(JSX), λΉ„μ¦ˆλ‹ˆμŠ€ 둜직(Custom Hooks), μƒνƒœ 관리(Global/Server State), 그리고 도메인 κ·œμΉ™(Features)을 λͺ…ν™•ν•˜κ²Œ λΆ„λ¦¬ν•˜μ—¬, 변화에 μœ μ—°ν•˜κ³  ν…ŒμŠ€νŠΈ κ°€λŠ₯ν•œ 'μ»΄ν¬λ„ŒνŠΈ 쀑심 λΆ„μ‚° μ‹œμŠ€ν…œ'을 μ„€κ³„ν•˜λΌ" β€” ν™•μž₯μ„± μžˆλŠ” React 앱을 μœ„ν•œ ꡬ쑰적 κ°€μ΄λ“œλΌμΈ. ## πŸ“– κ΅¬μ‘°ν™”λœ 지식 (Synthesized Content) - **μΆ”μΆœλœ νŒ¨ν„΄:** "Feature-Based Modularization and Functional Decoupling" β€” μ½”λ“œλ₯Ό 기술적 μ—­ν• (Components, Hooks)이 μ•„λ‹Œ λΉ„μ¦ˆλ‹ˆμŠ€ 도메인(Features) λ‹¨μœ„λ‘œ μ‘μ§‘μ‹œν‚€κ³ , 관심사λ₯Ό λΆ„λ¦¬ν•˜μ—¬ μœ μ§€λ³΄μˆ˜μ„±μ„ κ·ΉλŒ€ν™”ν•˜λŠ” νŒ¨ν„΄. - **핡심 μ•„ν‚€ν…μ²˜ μ „λž΅:** - **Custom Hooks for Logic:** λͺ¨λ“  λΉ„μ¦ˆλ‹ˆμŠ€ 둜직과 데이터 νŽ˜μΉ­μ€ μ»΄ν¬λ„ŒνŠΈ λ‚΄λΆ€κ°€ μ•„λ‹Œ μ „μš© μ»€μŠ€ν…€ ν›…μœΌλ‘œ μΆ”μΆœν•˜μ—¬ UI와 결합도 μ΅œμ†Œν™”. - **Compound Components Pattern:** λ³΅μž‘ν•œ UI μš”μ†Œλ₯Ό λΆ€λͺ¨-μžμ‹ κ΄€κ³„μ˜ μž‘μ€ μ»΄ν¬λ„ŒνŠΈλ“€λ‘œ μ‘°ν•©ν•˜μ—¬ μœ μ—°ν•œ API 제곡. - **Container-Presenter Logic:** (ν˜„λŒ€μ μœΌλ‘œ μž¬ν•΄μ„) 순수 UI μ»΄ν¬λ„ŒνŠΈμ™€ λΉ„μ¦ˆλ‹ˆμŠ€ 둜직이 μ£Όμž…λœ 래퍼 μ»΄ν¬λ„ŒνŠΈμ˜ λͺ…ν™•ν•œ μ—­ν•  λΆ„λ‹΄. - **Server State Management:** ν΄λΌμ΄μ–ΈνŠΈ μ „μ—­ μƒνƒœμ™€ μ„œλ²„ 데이터(Cache)λ₯Ό λΆ„λ¦¬ν•˜μ—¬ `TanStack Query` λ“±μœΌλ‘œ 효율적 관리. - **의의:** μš”κ΅¬μ‚¬ν•­ λ³€κ²½ μ‹œ 영ν–₯ λ²”μœ„λ₯Ό μ΅œμ†Œν™”ν•˜κ³ , 수백 λͺ…μ˜ κ°œλ°œμžκ°€ ν˜‘μ—…ν•΄λ„ μ½”λ“œ 좩돌이 적은 μ•ˆμ •μ μΈ μ½”λ“œλ² μ΄μŠ€ μœ μ§€. ## ⚠️ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & RL Update) - **κ³Όκ±° λ°μ΄ν„°μ™€μ˜ 좩돌:** κ³Όκ±°μ—λŠ” Redux에 λͺ¨λ“  μƒνƒœλ₯Ό λͺ°μ•„λ„£λŠ” 정책이 μΌλ°˜μ μ΄μ—ˆμœΌλ‚˜, ν˜„λŒ€ 정책은 'μƒνƒœμ˜ 성격(UI vs Server vs Global)에 λ”°λ₯Έ νŒŒνŽΈν™” μ •μ±…'을 μ„ ν˜Έν•¨. - **μ •μ±… λ³€ν™”:** Antigravity ν”„λ‘œμ νŠΈλŠ” λͺ¨λ“  λΉ„μ¦ˆλ‹ˆμŠ€ 둜직이 ν¬ν•¨λœ 훅에 λŒ€ν•΄ λ°˜λ“œμ‹œ λ‹¨μœ„ ν…ŒμŠ€νŠΈ μž‘μ„±μ„ μ˜λ¬΄ν™”ν•˜λ©°, λ·°(View)와 λͺ¨λΈ(Model)의 강결합을 μ—„κ²©νžˆ μ œν•œν•˜λŠ” 정책을 μ‹œν–‰ν•¨. ## πŸ”— 지식 μ—°κ²° (Graph) - [[Large-scale-Application-Architecture-Patterns]], [[Custom-Hooks-Patterns]], [[State-Management-Architecture-and-Ownership]], [[Frontend-Architecture-and-Folder-Structure]] - **Raw Source:** 00_Raw/React Application Architecture.md