🌼

Redux Query

Posted on Tue, Feb 9, 2021
Does React Query replace Redux, MobX or other global state managers?

Well, let's start with a few important items: React Query is a server-state library, responsible for managing asynchronous operations between your server and client Redux, MobX, Zustand, etc.

λ¦¬λ•μŠ€ 잘 μ“°κ³  κ³„μ‹œλ‚˜μš”? - λ¦¬λ””μ£Όμ‹νšŒμ‚¬ RIDI Corporation

λ¦¬μ•‘νŠΈ μƒνƒœκ³„μ—λŠ” λ‹€μ–‘ν•œ μƒνƒœ 관리 κ΄€λ ¨ λΌμ΄λΈŒλŸ¬λ¦¬λ“€μ΄ μžˆμŠ΅λ‹ˆλ‹€. κ·Έ μ€‘μ—μ„œ, λ¦¬λ•μŠ€ (Redux)κ°€ κ°€μž₯ 많이 μ‚¬μš©λ˜κ³  μžˆμ§€μš”. 톡계에 λ”°λ₯΄λ©΄ μ•½ 48%의 κ°œλ°œμžλ“€μ΄ λ¦¬μ•‘νŠΈ ν”„λ‘œμ νŠΈμ—μ„œ ν˜„μž¬ λ¦¬λ•μŠ€λ₯Ό μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€ [1]. 그런만큼, ν˜„μ—…μ—μ„œ λ¦¬λ•μŠ€λ₯Ό μ‚¬μš©μ€‘μΈ 뢄듀이 λ§Žμ„ 것이라고 μ˜ˆμƒν•©λ‹ˆλ‹€. λ¦¬λ•μŠ€μ˜ μ‚¬μš©λ°©μ‹μ— μžˆμ–΄μ„œλŠ” λ”± 정해진 κ·œμΉ™μ΄ μ‘΄μž¬ν•˜μ§€ μ•ŠκΈ° λ•Œλ¬Έμ— κ°œλ°œμžλ“€ λͺ¨λ‘ μžμ‹ λ§Œμ˜ λ°©μ‹μœΌλ‘œ μ„œλ‘œ λ‹€λ₯΄κ²Œ μ‚¬μš©μ„ ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

[React, Redux] λ‚΄κ°€ λ¦¬λ•μŠ€λ₯Ό 쓰지 μ•ŠλŠ” 이유

μ•ˆλ…•ν•˜μ„Έμš”, Einereμž…λ‹ˆλ‹€. (광고차단 κΈ°λŠ₯을 κΊΌμ£Όμ‹œλ©΄ κ°μ‚¬ν•˜κ² μŠ΅λ‹ˆλ‹€.) ν•΄λ‹Ή ν¬μŠ€νŠΈλŠ” Why I Stopped Using Redux λ₯Ό λ²ˆμ—­ν•œ κΈ€μž…λ‹ˆλ‹€. λ¦¬λ•μŠ€λŠ” λ¦¬μ•‘νŠΈ ν™˜κ²½μ—μ„œ ν˜μ‹ μ μΈ κΈ°μˆ μž…λ‹ˆλ‹€. λ¦¬λ•μŠ€λŠ” λΆˆλ³€ 데이터와 μ „μ—­ μ €μž₯μ†Œλ₯Ό 톡해 μ»΄ν¬λ„ŒνŠΈ νŠΈλ¦¬μ—μ„œ prop-drilling(νŠΉμ • 데이터 prop을 톡해 깊이 λ³΄λ‚΄λŠ” 것)을 방지할 수 μžˆμŠ΅λ‹ˆλ‹€. μ•± λ‚΄μ—μ„œ λΆˆλ³€ 값을 κ³΅μœ ν•˜λŠ” μƒν™©μ—μ„œ, λ¦¬λ•μŠ€λŠ” 졜고의 νˆ΄μž…λ‹ˆλ‹€.