4 ms·
> So I am not afraid of getting into a debate about why those are unusual patterns for React. I have seen some developers follow patterns just because they are
by flowerlad 6y ago
> So I am not afraid of getting into a debate about why those are unusual patterns for React.
I have seen some developers follow patterns just because they are patterns. Once the community starts doing things one way that's it, even if it is a dumb way, the herd mentality causes the dumb way to become established. Redux is one of those dumb ways.
> Because 30% of the business logic was inside Redux-Saga, I marked it as a high risk.
Business logic should be written in POJO. Plain Old JavaScript Objects. Using a library such as Redux is a dumb way, but this is the community-embraced, herd-mentality way.
> I will not encourage using it for enterprise applications.
Use Web Components. Using the flavor-of-the-month JavaScript libs for a large application that must live years or decades is not justifiable.
- Gaelan 6y ago> Business logic should be written in POJO. Plain Old JavaScript Objects. Using a library such as Redux is a dumb way, but this is the community-embraced, herd-mentality way. Redux is really just a pattern for business logic using POJO - you have a function that takes an update and returns the new state. The library itself is about a hundred lines. > Use Web Components. Using the flavor-of-the-month JavaScript libs for a large application that must live years or decades is not justifiable. How is web components not just another flavor-of-the-month JavaScript library, and an unpopular one at that? Sure, it's part of the browser instead of something you load externally, but I'm not sure that changes things in any meaningful way. You're still tightly binding your code to something which may or may not remain popular.
- TheCoelacanth 6y agoTrue of vanilla redux, but people using redux-thunk or redux-saga tend to bake it deep into their business logic.