DEV Community


Discussion on: Redux is half of a pattern (2/2)

jwp profile image
John Peters

My thoughts are that the single responsibility pattern trumps everything. SRP leads to small component parts where state is intrinsic to the component. If the component needs a state it doesn't have injected, then is can directly request and receive it at will. No top down state propagation needed. Containers then rely on each component to do the right thing. Container state is to where needed inject state to child component interfaces but that model should be rare. Cross component intercommunication must be simple to achieve.

State itself is not a separate concern it should be fully handled within the (small) components that only do one thing and are bulletproof.

Forget reducers, and redux or ngRx. They are not needed and as is being determined after all these years introduce complexity and other issues.