Redux: Rename Actions to "Records"?

Created on 31 Jul 2015  ·  4Comments  ·  Source: reduxjs/redux

I love the rename of Stores to Reducers, it really changes how you think about the code, and I noticed that there is some confusion between actual actions taken and the record of their results as Action objects.

Action objects are really only news items and they can be recorded by the reducers but they don't perform any work, that was already done. (started a request, got data from server etc).

Therefore I think it would help our mental model if they are renamed to Records (or NewsItems, Events, ...?).

Then ActionCreators can remain the "actions" they are colloquially (or even be renamed to just Actions).

It would look like this:

redux flow

Most helpful comment

What about Memo? Since that's what actions really kind of are. Just like in real life, Memos are read and acted upon by the Reducers (workers), and may be intercepted or modified on the way by Middleware (higher-ups).

Additionally, I think Record might be really confusing for Immutable users.

All 4 comments

We've been bikeshedding on this for quite a while, and from the conversations I was in, I didn't find any better word than “actions”. A new term has to be _significantly_ better to justify inventing yet another terminology.

Redux names comes from “Flux with reducers” and it makes sense for me to keep the Flux terminology, at least to aid the beginners.

In the new docs, we are calling them “actions” and “async actions”. I tried calling them “intents” but that just complicates docs because there is clearly a new term, but their role in Redux is supplementary rather than critical.

Another good name I heard was Fact. Just recording for posterity.

Events is a common term for facts in the event sourcing world.

What about Memo? Since that's what actions really kind of are. Just like in real life, Memos are read and acted upon by the Reducers (workers), and may be intercepted or modified on the way by Middleware (higher-ups).

Additionally, I think Record might be really confusing for Immutable users.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ramakay picture ramakay  ·  3Comments

CellOcean picture CellOcean  ·  3Comments

benoneal picture benoneal  ·  3Comments

caojinli picture caojinli  ·  3Comments

rui-ktei picture rui-ktei  ·  3Comments