ngxs / store

🚀 NGXS - State Management for Angular
http://ngxs.io
MIT License
3.54k stars 403 forks source link

When using state manager with Angular, Does it mean that all component class attributes are selectors ? If no what are the guidlines to decide what to store in the store and what to store in component class attributes ? #1124

Closed chaouiy closed 5 years ago

splincode commented 5 years ago

What do you mean? Example please

chaouiy commented 5 years ago

I have noticed that sometimes I don't need to store information in the store. So I store it directly in the component. My question is : are there any guidlines to decide whthere some variable should be part of the store or not.

On Wed, Jun 12, 2019, 17:35 Max Ivanov <notifications@github.com wrote:

What do you mean? Example please

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ngxs/store/issues/1124?email_source=notifications&email_token=AC4IXWL55XZA34RZZRIDR5DP2EJTBA5CNFSM4HXG7BBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXQ2Y6I#issuecomment-501329017, or mute the thread https://github.com/notifications/unsubscribe-auth/AC4IXWN2WSB4BKOZMJ4JB43P2EJTBANCNFSM4HXG7BBA .

splincode commented 5 years ago

NGXS is a state management pattern + library for Angular. Just like Redux and NgRx it is modeled after the CQRS pattern.

https://medium.com/@fastphrase/when-to-use-redux-f0aa70b5b1e2 https://blog.usejournal.com/why-and-when-to-use-redux-b57f7dae9269 https://blog.logrocket.com/why-use-redux-reasons-with-clear-examples-d21bffd5835/ https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367