Replies: 1 comment
-
There was a similar discussion a couple of months ago - #3398 (comment) But, yea, you should treat your actions as events, this is also what we encourage you to do in the docs https://ngrx.io/guide/store/actions.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
I've been working with ngrx for about 6 months now. I realize that is not so long, but i just want to share my thoughts about it. In the beginning ngrx looked a bit complex to me and there were things i didn't like. Now recently I turned my mind around it and I concluded the design of ngrx is good. It was just the term Action that was misleading me.
To me an action is not an action, because creating and dispatching an action does nothing on itself. An Action is just on object with a type that can contain some data. It does not contains functions. So that really does not feel like an action-object to me.
Because an action object itself does nothing I associated the term action, with 'user-triggered' action. Because often I dispatch actions as a result of user-actions like mouse-clicks. But that also felt wrong because in side-effects I often trigger an 'http'-request that results in new actions that are not triggered by the user.
Now recently in my mind I translate Action to Event and the design of ngrx makes more sense to me. So in my opinion Action is not the best name. I don't expect you to change it, but I like to know how you think about this. So let's start a quick poll.
6 votes ·
Beta Was this translation helpful? Give feedback.
All reactions