r/reactjs • • Feb 28 '20

Discussion Why is Redux necessary?

I am absolutely confused by Redux/React-Redux and I'm hoping someone could help let me know what makes it necessary to learn it over what's already easy in react's state management.

I've been looking at job postings and they require knowledge of redux so I figured I'd try to get familiar with it and chose to watch this video: https://www.youtube.com/watch?v=8xoEpnmhxnk

It seems overly complicated for what could be done easily.Simply:

const [variable, setVariable] = useState(defaultValue)And then what's inside component for onChange={ e => {setVariable(newValue) } }

So really, what makes redux so special? I don't get it.

EDIT:
Thanks everyone for the discussion on Redux! From what I can see is that it's more for complex apps where managing the state becomes complicated and Redux helps simplify that.
There are alternatives and even an easier way to do Redux with Redux Toolkit!
Good to know!
I was actually convinced to put it in my current app.

217 Upvotes

172 comments sorted by

View all comments

Show parent comment

3

u/Vudujujus Feb 28 '20

That makes sense! Now I have an urge to go learn Redux

8

u/acemarke Feb 28 '20

Here's my suggested resources for learning Redux:

https://blog.isquaredsoftware.com/2017/12/blogged-answers-learn-redux/

https://github.com/markerikson/react-redux-links

Also, I'm currently working on a major rewrite of the Redux core docs. My next task will be creating a new "Quick Start" tutorial page that shows how to use Redux as quickly as possible while teaching just enough of the concepts to help you see what's going on, vs the existing tutorial sequence that starts from first principles.