4 ms·
Why React Context Is Not “State Management”(and Why It Doesn't Replace Redux)
- threatofrain 6y ago> This post is meant to be a definitive set of answers to the "Redux vs Context?" question, covering purpose, capabilities, use cases, and when to use each. -- Acemarke, a highly visible maintainer of React.
- acemarke 6y agoI maintain _Redux_, not React. Sure, I'm obviously biased on the topic in that sense, but I'm an expert in this domain and I did my best to cover this as objectively as possible: - I stated the background, purposes, use cases, and capabilities of Context and Redux - I defined what "state management" is, provided supporting evidence, and showed why Context does not match that definition - I provided concrete guidance for when it makes sense to use each of these tools, and then offered my personal opinion (clearly labeled as such) for when I would prefer to use Redux in some situations.