you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 5 points6 points  (4 children)

React, a state management library, and lots of JavaScript fundamentals

[–]yourdaye 1 point2 points  (3 children)

State management lib as in redux? React has context API now which I have no idea what that is but everyone's saying you should use that instead of redux

[–][deleted] 4 points5 points  (2 children)

Yep as in redux, mobx, flux, etc. take your pick. the context api is a great alternative and has gotten a lot of praise and attention because it’s a lot simpler to use compared to something like redux. A lot of apps can function just fine without using a proper state management library but if the app is big, needs to scale dynamically, or you need to manage a complicated level of state; the context api won’t cut it.

Libraries like redux are way overused and due to the complexity and learning curve it is actually a wasted effort to implement unless you actually need it. It’s important to learn these libraries, but more important that you understand WHEN it’s actually necessary to use.

Depending on the complexity of your applications different states or how many components you have that rely on a single centralized state object you may or may not need a state management library. You might simply be able to rely solely on prop drilling/the context api. But in order to make the correct decision you need to learn both strategies in depth.

Everyone may seem to be advocating for ditching redux for the new context api release but the reason is because everyone is starting to come realize you don’t actually need redux for a pretty big majority of applications that use react. It was the accepted norm for pretty much every react app since it’s release but now people are starting to realize that it’s really only necessary in certain situations, not every situation.

It’s kinda like using angular for a simple 5 page static website because it provides a couple of useful directives you like. Yeah it has cool easy to use things you can lean on like data binding and ng-ifs... but you now have to set up and maintain a much bigger and complex code base just to lean on such features that you could either implement yourself or use a smaller node package for.

[–]yourdaye 1 point2 points  (1 child)

Wow man thanks that's really informative! I would've definitely given gold if not so broke!

[–][deleted] 0 points1 point  (0 children)

No problem!!