DEV Community

Discussion on: React... Why so complicated...?

Collapse
 
seanmclem profile image
Seanmclem • Edited

In the first few lines of this article you quickly equate how complicated Redux can be with how complicated react is. React in itself can be rather simple and elegant. Adding a whole separate Library called Redux doesn't make react itself more complicated. It's the library that you're adding.

React's own State Management, context api, could be a bit intimidating at first too, but less than redux. Which is why you shouldn't use any state management at all when starting to learn react. You should probably just start with simple components, passing the state through props, and slowly add more complicated things.

Also, with a modest amount of patient reading all of the code samples you showed can be understood. All it takes is a little bit of JavaScript literacy and some time.

It didn't become as popular as it is because of unreadability and needless complication. Like any other programming concept all it takes is time, patience, and capacity to learn.

Collapse
 
joetex profile image
Joel Ruiz • Edited

You make great points. I should have started with my React examples.

But the examples I have shown are not ideal for actual applications. There is a constant need to cross reference data, and it should be ready to happen at any time.

I feel like many frameworks try to have you hardcode data relationships against each component.

If we lock ourselves in, we just end up having to refactor several parts to add the new feature. For instance, NoSQL is popular for modern applications, but then we turn 180 degrees and lock down data in our applications.

If we can freely access any data at any time, it might increase chaos, but coding time for wild requirements can be handled quickly.

Collapse
 
seanmclem profile image
Seanmclem

It's just that, React is a simple UI library. How you get and manage data is really up to you. It can be whatever you want it to be.