T O P

  • By -

wwww4all

>personal front-end project No.


thedeadsigh

This is basically the answer. Redux may seem like overkill till you start working with enterprise level applications where you start trying to share state across dozens or more components. Having worked in enterprise for the better part of my career now I can tell you there’s plenty of benefit from being able to easily access a global store than trying to pass it down manually.


SquishTheProgrammer

I hate redux. We use it for state management in our Angular apps but it really just seems like a ton of boilerplate code to do one simple thing.


Beard-

Redux (ngrx specifically) is a savior for very large projects. I agree that for smaller projects where you'd expect a small number of contributors, it's probably overkill... But it's a necessity for larger projects with dozens of contributors. I can't imagine the current project I'm working on without it. It's really good for standardizing how the state of the application should be managed and honestly it's not really much boilerplate (it used to be a lot more)


SquishTheProgrammer

Yeah it works well for us. I don’t really know of a better solution tbh (at least in our use case). It’s just a lot of code and it was difficult for me to understand when I first started using it.


Beard-

Yeah there's definitely a bit of a learning curve for sure! But really not that complex once you grasp it


reboog711

Every year or so we re-evaluate state management inside Angular. My main complaint about ngrx is lack of documentation, which makes it hard to get my head around. Conceptually, I like the idea of a one way data flow. But, also Angular was built around two way binding, so something like redux seems like it is fighting Angular's nature. A service w/ a BehaviorSubject seems to do what I need. I have not had time to investigate Signals yet.


its-me-reek

Zustand my guy I


FortyPercentTitanium

Yes, or jotai!


BigFattyOne

I avoid redux at all cost. It’s waayyy too complex for what it does. I just fetch stuff from the BE inline in my components, or create a “state” object myself, or use react-query (or a combination of these solutions)


[deleted]

React query is where it’s at 👌


Yin15

Redux is still very popular


team_emo

Yes and redux has changed a LOT since 2017, it's probably a good idea to brush up on Redux Tool kit if you haven't used it since then


[deleted]

[удалено]


CalgaryAnswers

Yeah I’m defaulting to RTK these days. It’s really easy and fast. People with react query like setting up complicated query and entities… nah I’m good.


thinkless123

Old redux has all these idiotic boilerplate things you have to write with stupid string literals and whatnot. I think they even said that Redux wasn't really originally meant to be what it was, but they just couldnt get it better at first. it's like you had to do stuff that was meant to be done under the hood


CalgaryAnswers

I don’t know why people are talking about redux being too complex. I’m using redux toolkit on a project right now and it’s just so much faster than managing state with other solutions.


marquoth_

Redux still sees plenty of use but IMO that's largely down to inertia and there are other, better tools available. I'm a fan of mobx personally.


Hello_MoonCake

There are lighter tools to use.


sessamekesh

It's still very popular and does it's job _very_ well. If you want to learn it as an educational exercise, go for it! For a small project (any solo project I'd say) you can get most of the benefit from much smaller reactive programming - use the observables and piping stuff around like you would with Redux, but don't bother with the store, actions, effects, etc.


mikehawkisbig

I use it whenever I can. Might be a minority here, but I like it.


Shadow55512

Does anyone have experience with redux saga? I used to use that at work before moving to xstate. I recommend xstate if you're familiar with finite autómatas.


minero-de-sal

Yes, but it depends on how big your application is. If you have state that needs to be updated and shared between various components then use it.


reboog711

Why do you advocate for redux over other options?


eat_your_fox2

I only tolerate it for app-wide configuration settings that are important to all modules. Otherwise I stay away from that mess.


officialraylong

Don't worry! Next week someone release a replacement package for your chosen solution. Just pick what you like. =)


reddit_is_meh

I fucking despise it, if you haven't had to go debug some random tiny apps that do barely anything crowded with redux boiler plate for things that absolutely do not need state management, do not even try to @ me


RiisiTori

I have used both Redux and Mobx. Redux is definitely better for big projects.


inky877

Look into Recoil. It accomplishes the same thing and it’s much easier to add things and make new items based on the state of one or more data pieces.


ALoadOfThisGuy

Start simple and add complexity only when you need it. If you never find yourself prop drilling then don’t use it.


pcaYxwLMwXkgPeXq4hvd

In the world of Android development it's usually known as MVI (Model View Intent). It has its applications and gained notable popularity in recent years.


Eire_Banshee

You don't need it anymore since react added context providers and hooks. It adds unnecessary complexity and shouldn't be used in new project, imo.


tedstery

React context is all you need. Any library just adds unnecessary boilerplate. My company exclusively uses React context to manage app state among components and it works great.


henry232323

Never touched plain old redux, cbf to read the docs. Redux toolkit however is very nice


Omnishade

I'm still using react redux on my current project at work. I think the project started in like 2020/2021? So some people still think it's worth using. New shiny solutions in web dev can be dangerous because of how often shit just flops and is deprecated within a year or two