Question about Redux

Why is Redux important ? I can do the same work without use it.
I see that React is enough to do the whole work.

Yes, there is nothing that you can do with redux that cannot do with pure React. But…

As your app gets bigger and bigger, managing state across a large tree of components gets tricky. As the app grows, the complexity of dealing with state can grow exponentially. Redux was made to make that a lot easier. And things like thunks and sagas make dealing with async data easier. It also allows you to extract this logic from your React files which can keep things cleaner.

True, React has context which helps with the state management and now you can do a lot of async data can be put into reusable custom hooks. But many still find Redux to be useful.

But yeah, in the beginning, you don’t really need it, and that can cause a little confusion. To paraphrase what someone once said here. We shouldn’t teach redux in the beginning. We should teach React and let them build bigger and bigger apps until they are pounding their heads against the desk with frustration, wondering why there isn’t a better way. Then they’re ready for redux.

But yeah, when I was learning redux, I was asking myself the same question. This is so strange and complicated! Why am I learning this? But now it is an integral part of how I work on apps. True, if I don’t need it on a small app, I don’t use it, but the bigger the app gets, the more I need it.

1 Like